Merge lp://staging/~stephen-j-boddy/terminator/performance-tweaks into lp://staging/terminator/trunk
Proposed by
Stephen Boddy
| Status: | Merged |
|---|---|
| Merged at revision: | 1220 |
| Proposed branch: | lp://staging/~stephen-j-boddy/terminator/performance-tweaks |
| Merge into: | lp://staging/terminator/trunk |
| Diff against target: |
260 lines (+68/-30) 7 files modified
terminatorlib/container.py (+3/-1) terminatorlib/factory.py (+20/-8) terminatorlib/notebook.py (+2/-2) terminatorlib/paned.py (+2/-2) terminatorlib/terminal.py (+21/-7) terminatorlib/util.py (+0/-8) terminatorlib/window.py (+20/-2) |
| To merge this branch: | bzr merge lp://staging/~stephen-j-boddy/terminator/performance-tweaks |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Chris Jones (community) | Approve | ||
|
Review via email:
|
|||
Description of the change
Greatly improve performance when dragging splitters in complex layouts.
Test case is a 4x5 grid, created with 4 x Ctrl+o, then 3 x Ctrl+e in each of
the 5 terminals. This is then saved as a layout and loaded on each test.
Once loaded and CPU drops, grab the first horizontal splitter, and move the
mouse around in a circle quickly enough to outpace the lagging splitter for
approx 15 seconds. This will max the CPU out regardless and, before these
improvements, will be /very/ laggy.
To post a comment you must log in.

I didn't mention it before, but I used profiling to investigate and verify these improvements, with some neat scripts that will generate call graphs and reports. I can add those as another revision if you think they'd be useful.
To give you an idea:
rev 1186 makes the factory isinstance method ~51 times faster.
rev 1187 means the factory __init__ method is called ~1/265 th
rev 1188 is ~10x faster finding the window of the current widget
rev 1189 is difficult to quantify, suffice to say it makes a huge difference in the interactivity.