diff options
| author | Sjoerd Job Postmus <sjoerdjob@sjec.nl> | 2016-06-01 20:23:19 +0200 |
|---|---|---|
| committer | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-12 17:23:21 -0700 |
| commit | 6145070d6590f1e8f7fc4d86fb0a1061bc1a47d9 (patch) | |
| tree | eb0ad8e7a985c25c7a6b813d59bf4420c1cfdb60 /sqlparse/formatter.py | |
| parent | a767c88b008d407d91b9118d124e2a9b579a7f12 (diff) | |
| download | sqlparse-6145070d6590f1e8f7fc4d86fb0a1061bc1a47d9.tar.gz | |
Call `Token`-methods index based.
A lot of methods have token-to-idx magic due to `Token._find_matching`
converting tokens to indexes. Unknowingly, this turns innocent looking
algorithms into O(n^2) (or worse).
This does not solve the problem, but makes it more clear by moving the
call to `Token.token_index` obvious at the call-site, at the cost of
repeating it over-and-over.
Diffstat (limited to 'sqlparse/formatter.py')
0 files changed, 0 insertions, 0 deletions
