Skip to content

perf: prefetch other mailboxes in the background #10986

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

st3iny
Copy link
Member

@st3iny st3iny commented Apr 11, 2025

Resolves #10718

This will trigger a request for each subscribed mailbox to cache the first few envelopes in the frontend. Opening a prefetched mailbox will be instant. Otherwise, the usual loading skeleton will be shown.

Screencast

In this example, the inbox and trash folders are subscribed (and prefetched). The third folder, cache, is not subscribed and will be loaded once opened.

2025-04-11.14-02-20.mp4

TODO

  • Is the trade-off worth it? For each subscribed mailbox there will be a request to fetch at most 20 envelopes from the db (no syncing or IMAP stuff!).

This will trigger a request for each subscribed mailbox to cache the
first few envelopes in the frontend. Opening a prefetched mailbox will
be instant. Otherwise, the usual loading skeleton will be shown.

Signed-off-by: Richard Steinmetz <[email protected]>
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.

Cache first page of all mailboxes in the frontend
1 participant