Skip to content

Check lastDownsample in viewTransformChanged#755

Merged
j9ac9k merged 1 commit intopyqtgraph:developfrom
ChristophRose:patch-1
May 31, 2020
Merged

Check lastDownsample in viewTransformChanged#755
j9ac9k merged 1 commit intopyqtgraph:developfrom
ChristophRose:patch-1

Conversation

@ChristophRose
Copy link
Copy Markdown
Contributor

Add a check in the viewTransformChanged function to only force a rerender when the downsampling factor changed.
Previously simply moving the image around or zooming in/out without changing the downsampling factor would force a complete rerendering of the image, which was very slow with large images. This way, the expensive rerender is only forced if necessary.

Fixes #752

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented May 31, 2020

bah, in attempting to update this PR and fix the merge conflict, I messed it up, sorry @ChristophRose ... going to try and straighten it out right now...

Add a check in the viewTransformChanged function to only force a rerender when the downsampling factor changed.
Previously simply moving the image around or zooming in/out without changing the downsampling factor would force a complete rerendering of the image, which was very slow with large images. This way, the expensive rerender is only forced if necessary.
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented May 31, 2020

CI Passed, looks good to me, thanks for the PR @ChristophRose and sorry it's taken us so long to follow up.

@j9ac9k j9ac9k merged commit e70d1b5 into pyqtgraph:develop May 31, 2020
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.

ImageItem: autoDownsample forces qimage recalculation every render

2 participants