-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minigui: win32 updates very slow #293
Comments
my suspicion here is each change redoes all the layout in n^2 time cuz each change of children redoes it for all remaining children. i'm tempted to queue that to make it asynchronous like painting. but then various fields won't be updated immediately and that might be a breaking change... im not sure how relevant that will be... |
also on first interaction with the UI (checking a checkbox, changing input lines, etc) it seems to rerender everything because it lags again then |
hmm it works without lag on linux but the difference could still be that
relayouter since in windows that's a heavier operation
|
oooh i didn't check the msg in WM_COMMAND so it was running the change
event on almost any interaction with the box.
ok that's an easy fix.
then the layouts redraw on mouse hover which is also just waste (the new
Style thing assumed hover events matter by default but like now i have
to remember to override it in tons of places... sigh that might have
been a mistake)
it much better already but still horrible cuz the scrollable widget
seriously sucks and i came close to formally deprecating it in 10.0 but
i use it for some things internally and ran out of time in replacing it.
maybe i can fix it though.
|
here is a video what it's doing: https://streamable.com/b5y7ij |
On Wed, Jun 30, 2021 at 07:02:42AM -0700, Jan Jurzitza wrote:
here is a video what it's doing: https://streamable.com/b5y7ij
yeah it is already a little better but the initial change is still slow.
prolly cuz of the n^2 movement causing a bunch of redraws and stuff.
i'll still see if i can batch that somehow.
|
I would also be fine if I could do it virtually and then submit it all at once to you. (Like working on a widget and then only when done adding it as child to the list) I think that would be a better approach actually, although additionally also batching would make this easier for things like whole lists. |
new methods
make a huge difference on this speed thing. so it coming together. but the max height is still broken in all this. i clamp max height for individual widgets but when there's 64, no one thing goes over the limit but the rest do and then it breaks layout adding a new native container window also helps the scroll and click stuff working. so slowly making this not suck. |
actually i think i can auto-batch it fairly effectively by just hooking it into the (required anyway) batched redraw event. |
I think I'll push live pretty soon, it is a LOT better than it was now though still a little slow to add/remove; you notice the lag but still. I think it is actually the remove all that is a bit slow but it actually works and isn't too terrible. |
check this code, any interaction with it or recreating checkboxes takes multiple seconds of unresponsiveness to load:
The text was updated successfully, but these errors were encountered: