Skip to content
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

Event queue optimizations #4571

Merged
merged 2 commits into from
Sep 13, 2023
Merged

Event queue optimizations #4571

merged 2 commits into from
Sep 13, 2023

Conversation

nirvn
Copy link
Member

@nirvn nirvn commented Sep 13, 2023

Alright, this turned out to be quite an instructive investigation.

Animated QML items are great looking, but turns out they end up flooding the main app event queue, which in turn has some significant consequence when trying to invoke methods on the main app thread (e.g. rendering maps with data-defined expression that require a main thread method invocation).

The biggest issue here turned out to be the legend. Even if an animated item is not visible, the animation does run and does trigger a lot of event. In our case, we had an animated tracker badge for each legend item triggering events, which meant that a large project would create loads and loads of events.

Solution: if an animation isn't providing that much more visual feedback, kill it. If it's important or can be confined, insure it's only running when needed.

@qfield-fairy
Copy link
Collaborator

Copy link
Member

@m-kuhn m-kuhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@nirvn nirvn merged commit b89296a into master Sep 13, 2023
17 of 19 checks passed
@nirvn nirvn deleted the optimizations branch September 13, 2023 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants