Replies: 2 comments 6 replies
-
|
Thanks for the detailed analysis. Interesting that Can you share your project? We might be able to offer more suggestions. |
Beta Was this translation helpful? Give feedback.
6 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
App Summary
pyserial-asyncioLabelwidgets, each usingquery_onemethod withidselector andexpected_types.DatatableLabelwidgets and aInputwidget to change the value for the parameterIssue
The app was not really responsive while and after creating around 800 widgets for the parameters.
Profiling
I ran pyInstruments as Will suggested and it turns out
query_onemethod was the bottleneck.Troubleshotting
Messagefrom workers and handled updates within the message receiver. (Small improvement)query_onefrom the direct parent of the widget, instead ofApp, improved performance(60% of total app runtime -> 40%)query_oneand caching label widgets as variables for direct access greatly improved performance(60% -> 5%). While this is not recommended, it may be worth using in hot loops with widgets that are not being removed and mounted again.mount_allinstead ofmountwithforloop greatly improved performance. Also, removing widgets usingremove_children("*")greatly improved performance as well.Remaining Issue
VertialScrollcontainer. This lags once in a while during scrolling.Beta Was this translation helpful? Give feedback.
All reactions