seantronsen / pvt

GNU General Public License v3.0
0 stars 0 forks source link

Window resizing is obnoxiously slow #40

Closed seantrons closed 5 months ago

seantrons commented 5 months ago

When spawning a window, if it isn't already the desired size it's natural to immediately use the mouse to drag it to a new size. However, with the current library setup this operation is painfully slow and the problem occurs even when attempting to maximize the window.

We should check to see if something is slowing down the initial render cycle. Maybe it's the use of layouts or perhaps we're not abiding by the design recommendations of Qt as much as we should be.

seantrons commented 5 months ago

Example: https://github.com/seantronsen/qtviewer/assets/142455901/9a263efc-6309-4a37-b726-3502c4927ef7

seantrons commented 5 months ago

Oddly enough, trackbar ticks were a component of this problem. That is, removing ticks from trackbars yielded a significant speed up in terms of responsiveness.

See this commit for details: https://github.com/seantronsen/qtviewer/commit/aea71d38cf5364b9da94c7fdcf4ed2f3522b7031

seantrons commented 5 months ago

Leaving this open in case other things turn up as clunky / laggy interface components.

seantrons commented 5 months ago

I've been using it for a few days since adding that last fix and haven't noticed any window-related performance issues. Gonna close this out.