powerline/lib
Kim Silkebækken f4e3d01d07 Improve rendering performance
This commit almost doubles the segment rendering performance. This is
accomplished by caching a lot of data like highlighting groups, moving
some calculations out of loops, and by performing less function calls
overall.

When a width is specified the main speed improvement comes from avoiding
rendering the raw segments over and over until the statusline is short
enough. Instead, the raw rendering is stored as a segment property and
the combined length of all these renderings is used when removing
low-priority segments instead. This results in a maximum of two
rendering passes.

Some "less pythonic" solutions have been chosen some places for
performance reasons, e.g. joining strings instead of appending and
joining lists.

Overall this commit appears to make the performance equal or better than
the legacy vimscript implementation. Later optimizations (in particular
finding another method than remove() for removing low-priority segments)
may make this version of Powerline far superior both in terms of
functionality and performance.
2012-11-21 09:57:16 +01:00
..
renderers Improve rendering performance 2012-11-21 09:57:16 +01:00
__init__.py Add initial project files 2012-11-08 12:23:57 +01:00
colors.py Improve rendering performance 2012-11-21 09:57:16 +01:00
core.py Improve rendering performance 2012-11-21 09:57:16 +01:00