Skip to content

fix: wrong key set to _pixelVectorCache#2795

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:fix-local-key
Aug 12, 2023
Merged

fix: wrong key set to _pixelVectorCache#2795
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:fix-local-key

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Aug 8, 2023

#1212 changed the lookup key used for the local cache from dt to a common key used also by the global cache.
The local cache update at the end of the function was not similarly modified to use key.
At worst, this causes the very first local cache lookup after a computation to always be a miss.

There appears to be another inconsistency present nearby. Elsewhere in the function (2 places), a copy of pv is returned. This copying is not done for the return at the end of the function. This was already the behavior prior to #1212.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Aug 12, 2023

Ha, a bug that got merged not by me 🎊

Thanks for the PR @pijyoi nice find! At one point, I was debugging something related and was suspicious of bogus caching... and noticed one of those caches seemed to never hit; but as that wasn't what I was debugging, I moved on...

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Aug 12, 2023

I can't speak to if the intended behavior is to return a copy of the point or not tho...

@j9ac9k j9ac9k merged commit 7b8c849 into pyqtgraph:master Aug 12, 2023
@pijyoi pijyoi deleted the fix-local-key branch August 13, 2023 09:31
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.

2 participants