Extremely slow wxWidgets overhead around Render
degracode opened this issue · 0 comments
Describe the bug
A render often takes 10+ seconds longer than the 'rendered in ...' status bar message says.
Profiling indicates it takes 2 seconds to disable the UI, and 8 seconds at the end to re-enable it. I believe (but not 100% sure) that enableAllChildControls's recursion is causing massively redundant work. All of the time is being spent inside wxWindowBase::NotifyWindowOnEnableChange, and subsequently Windows APIs, significantly NtUserEnableWindow.
To put this in perspective, for a simple sequence that takes 15s to process - 10 seconds is spent inside two calls EnableSequenceControls, and 3s doing actual rendering (and 2s I haven't analysed).
As a quick test, I removed the recursive enableAllChildControls
call within, and render completion is a) about half the time, and b) the UI appears to disable and re-enable as before, suggesting that at least some redundant work is happening.
Presumably wxWidgets apps don't all generally exhibit such terrible performance when enabling/disabling UI. Is there a problem here that's xLights-specific?
Versions (please complete the following information):
- OS: Windows 11
- xLights version 2024.19.1