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

Avoid a redundant calculation of visible layer extent in overview canvas #50329

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

nyalldawson
Copy link
Collaborator

This was being called twice immediately in a row, and the first time was skipping the "isVisible" check used before the second call. As a result we were ALWAYS recalculating the full extent of the project with every layer set change, even when the overview canvas was not open (and this is non-trivial for very large projects!)

On one test project this reduces a multi-second pause when checking/unchecking layers/groups in the tree to no pause.

This was being called twice immediately in a row, and the first time
was skipping the "isVisible" check used before the second call. As
a result we were ALWAYS recalculating the full extent of the project
with every layer set change, even when the overview canvas was not
open (and this is non-trivial for very large projects!)

On one test project this reduces a multi-second pause when
checking/unchecking layers/groups in the tree to no pause.
@nyalldawson nyalldawson added Optimization I feel the need... the need for speed! backport queued_ltr_backports Queued Backports labels Sep 26, 2022
@github-actions github-actions bot added the GUI/UX Related to QGIS application GUI or User Experience label Sep 26, 2022
@github-actions github-actions bot added this to the 3.28.0 milestone Sep 26, 2022
Copy link
Contributor

@nirvn nirvn left a comment

Choose a reason for hiding this comment

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

A one-line removal optimization! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport queued_ltr_backports Queued Backports GUI/UX Related to QGIS application GUI or User Experience Optimization I feel the need... the need for speed!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants