diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-05-19 01:34:24 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-05-19 01:34:24 +0200 |
| commit | 36971bb127f3505a47cdf3d1f2e965ec12266247 (patch) | |
| tree | 14f459a61a7bdb76b8b141b43ee12af87d148210 /kconfiglib.py | |
| parent | 754ca0f865c2484ff6bf14d9db1c321c0a677273 (diff) | |
Micro-optimize help text parsing some more
This code is surprisingly hot.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 7e90c26..b73ea10 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2301,10 +2301,11 @@ class Kconfig(object): # than the first line help_lines = [] - # Small optimization + # Small optimizations add_help_line = help_lines.append + indentation = _indentation - while line and (line.isspace() or _indentation(line) >= indent): + while line and (line.isspace() or indentation(line) >= indent): # De-indent 'line' by 'indent' spaces and rstrip() it to remove any # newlines (which gets rid of other trailing whitespace too, but # that's fine). |
