Repository navigation
perf(preview): limit the max preview size of non-image files - #65147
Open
CarlSchwan wants to merge 1 commit into
Open
CarlSchwan wants to merge 1 commit into
CarlSchwan wants to merge 1 commit into
Conversation
CarlSchwan
requested review from
leftybournes,
provokateurin,
salmart-dev and
sorbaugh
and removed request for
a team
October 5, 2026 15:02
Only images have their max preview shown in the viewer, for other files the largest preview the UI requests is the one of the sidebar. Still, their max preview was rendered at up to 4096x4096 px: the text preview draws a 4096x4096 image with a 128px font, which every smaller preview then has to decode again. Limit the max preview of non-image files to 1024px. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
CarlSchwan
force-pushed
the
carl/preview-non-image-size
branch
from
October 5, 2026 17:49
ac6191b to
5190e69
Compare
This branch has not been deployed
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.
Summary
Only images have their max preview shown in the viewer, for other files the largest preview the UI requests is the one of the sidebar. Still, their max preview was rendered at up to 4096x4096 px: the text preview draws a 4096x4096 image with a 128px font, which every smaller preview then has to decode again. Limit the max preview of non-image files to 1024px.
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)