Skip to content

[stable35] perf: Improve preview cold generation - #65451

Open
backportbot[bot] wants to merge 2 commits into
stable35from
backport/65146/stable35
Open

backportbot[bot] wants to merge 2 commits into
stable35from
backport/65146/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Backport of #65146

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

When the max preview was just generated, its image is still in memory.
Use it to resize the requested preview instead of reading the stored max
preview back and decoding it again, which for a 12 MP photo takes a
few hundred milliseconds.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
New preview sizes were always resized from the max preview, so each one
paid for decoding and resampling the full resolution image. Use the
smallest cached, uncropped preview that is still larger than the
requested size as the source instead, e.g. the 256px grid view preview
for the 64px list view one.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan
CarlSchwan marked this pull request as ready for review October 14, 2026 08:01
@CarlSchwan
CarlSchwan requested a review from a team as a code owner October 14, 2026 08:01
@CarlSchwan
CarlSchwan requested review from sorbaugh and removed request for a team October 14, 2026 08:01
@CarlSchwan
CarlSchwan force-pushed the backport/65146/stable35 branch from dfaa240 to 2261877 Compare October 14, 2026 08:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants