OutputPanelBar is too slow to update position when layout changed
Should we change the layout checker frame rate from 4Hz (0.25s) to 30Hz (0.033s) ?
def startup():
Images.shared = Images()
global _update_timer
_update_timer = core.timer(Layout.update_layouts, 0.25, True) # => core.timer(Layout.update_layouts, 0.033, True)
The performance looks OK, and the experience has been enhanced.
Did you look at the performance of the plugin_host-38? This isn't free and is always costing cpu cycles for something that almost never changes anyway. How often are you modifying the layout of the editor anyway?
The issue not only when change the layout, but also scoll the console panel.
the performance of the plugin_host-3.3 looks ok.
Its using an extra 3 percent at all times for me which for me seems pretty unacceptable
https://github.com/daveleroy/SublimeDebugger/blob/6f4c900cf5c27f93d1289abc6731e34030ece78e/modules/ui/layout.py#L272 controls how many updates before the bottom bar returns after scrolling ends
Does changing the value from say -2 to a higher value to maybe even positive like 3 or 4 so it returns half a second after scrolling ends help? Is that what you are trying to improve here?
The effect has improved after change the value to +3. But I still need improve the checker frame rate. In my computer the cpu cost of plugin_host-3.3 is always 0 percent.
Debugger runs in plugin_host-3.8 not plugin_host-3.3.
If you want to put in your own code to do this go for it but I'm wary of any performance impacts that happen when idle. The real solution is getting sublime to implement events when the layout changes. There is the ticket for that https://github.com/sublimehq/sublime_text/issues/12