-
Notifications
You must be signed in to change notification settings - Fork 258
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
Peformance issues dynamically updating widget heirarchy #683
Comments
At first glance this looks technically correct. A small tip could be that the From a more fundamental point of view, you could ask whether using Flexx widget objects for the leaf information (the objects being created and deleted all the time). They certainly may introduce overhead. Three alternatives:
|
I looked into using Based on this note in # TODO: we listen to a lot of events which is unncessary in a lot of cases.
# Maybe make it possible (with a class attribute?) to configure this I hacked in default_events = event.BoolProp(True, settable=True, doc="""
If true, add event handlers for mouse and touch events.
""") ... def _init_events(self):
if not self.default_events:
return
... This helps some, as not hooking up 15 events for |
It seems I can't call
At the moment, I don't see any way around this without hacking something like this into def render_hammer(self):
self.__render() After doing so and overloading I have yet to figure out what property or properties |
The In this case, create a property that gets changed whenever you scroll, and access that property in |
Ah, I actually have to reference all properties I might use the first time Flexx calls |
Yes, good point. |
As a mostly static-compilation guy, I hold the "Introspect All The Things" implementation of Flexx in a certain amount of awe (and a tiny amount of horror ;-) Thus I pay you the highest compliments I know:
Thanks for the help! |
Having resolved my issue around knowing the
clientHeight
, I ended up with this (borrowing heavily from the TreeWidget):This code works, but actually updating the display takes quite a bit of time. Given that updating one or two items (triggered via scroll-wheel) happens quite quickly, but scrolling an entire page (via clicking at an arbitrary location in the scroll bar) takes on the order of a second for a window with about 100 visible items, I suspect the destruction/construction overhead.
I think I went about this in a Flexx-friendly way, but I'd welcome any suggestions for improving performance.
The text was updated successfully, but these errors were encountered: