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

improve operation cache touch #4359

Merged
merged 1 commit into from
Jan 26, 2025
Merged

Conversation

jcupitt
Copy link
Member

@jcupitt jcupitt commented Jan 24, 2025

On a operation cache hit, we were only touching the hit itself.

As a result, after some operations on a loaded image, the image itself could be forced out by the operations that had been performed on it, even though the underlying image was still being used.

This PR makes cache touches also update the timestamps on all upstream operations, since the upstream operations are also being used (indirectly).

On a operation cache hit, we were only touching the hit itself.

As a result, after some operations on a loaded image, the image itself
could be forced out by the operations that had been performed on it,
even though the underlying image was still being used.

This PR makes cache touches also update the timestamps on all upstream
operations, since the upstream operations are also being used
(indirectly).
@jcupitt
Copy link
Member Author

jcupitt commented Jan 24, 2025

The libvips operation cache was adapted from the one in nip2 and was supposed to be useful for nip4.

Now nip4 is (finally!!!) coming to life, of course I'm finding all kinds of issues with the libvips version of the cache. This PR stops animated GIF display forcing load operations out of the cache because of the constant crop calls to pull frames out.

@jcupitt jcupitt merged commit dc21cfb into master Jan 26, 2025
13 checks passed
@jcupitt jcupitt deleted the improve-operation-cache-touch branch January 26, 2025 11:32
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