Skip to content

[stable5.13] perf(messages): cut redundant work when opening a message - #13924

Merged
kesselb merged 1 commit into
stable5.13from
backport/13359/stable5.13
Oct 27, 2026
Merged

kesselb merged 1 commit into
stable5.13from
backport/13359/stable5.13

Conversation

@backportbot

@backportbot backportbot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Backport of #13359

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.

Opening a message sanitized the HTML body twice, downloaded the full
message and all attachments for itinerary extraction even when no
KItinerary adapter is installed, and re-fetched every inline image over
a fresh IMAP login.

The sanitized HTML is memoized per message id, because getBody()
requests it for both the cache write and the response. Itinerary
extraction checks for an adapter before touching IMAP and caches the
empty result. Attachment downloads are privately browser-cacheable for
1h, since the content of a given message and attachment id never
changes.

The empty itinerary is cached for the regular TTL, so installing
KItinerary later only applies to already opened messages once those
entries expire.

Assisted-by: ClaudeCode:claude-fable-5
Assisted-by: ClaudeCode:claude-opus-5
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Alex DiMarco <alex@dimarcotech.com>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb
kesselb force-pushed the backport/13359/stable5.13 branch from 1b2e565 to 1f8f582 Compare October 27, 2026 13:45
@kesselb
kesselb marked this pull request as ready for review October 27, 2026 13:47
@kesselb
kesselb requested a review from GretaD as a code owner October 27, 2026 13:47
@kesselb
kesselb enabled auto-merge October 27, 2026 13:49
@kesselb
kesselb merged commit 66aeb70 into stable5.13 Oct 27, 2026
47 checks passed
@kesselb
kesselb deleted the backport/13359/stable5.13 branch October 27, 2026 14:20
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.

2 participants