perf: preview cache optimizations - #3194
Merged
Merged
Conversation
JammingBen
marked this pull request as draft
August 21, 2026 06:39
JammingBen
force-pushed
the
perf/preview-cache-optimizations
branch
from
August 21, 2026 06:56
fdfd763 to
27ab340
Compare
JammingBen
marked this pull request as ready for review
August 21, 2026 09:20
kulmann
requested changes
Aug 24, 2026
This ensures we don't keep any stale preview URLs for files that are long gone.
The preview cache now has a byte limit instead of a plain capacity limit. This makes more sense and generally increases the limit in file lists, which should improve performance in big file lists with lots of previews. Also, calling get() and set() on the cache stops looping the entire cache to evict and instead does a lookup.
This way, we avoid conflicts between different fetched previews for the same resource (e.g. preview in file list shouldn't mess with preview in the right sidebar).
JammingBen
force-pushed
the
perf/preview-cache-optimizations
branch
from
August 24, 2026 14:30
27ab340 to
ce4a3ac
Compare
JammingBen
force-pushed
the
perf/preview-cache-optimizations
branch
from
August 24, 2026 14:46
ce4a3ac to
8ba8d9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
get()andset()on the cache stops looping the entire cache to evict and instead does a lookup.refs #3167