Skip to content
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

Store envelope actions in a debounced queue #10725

Open
st3iny opened this issue Feb 18, 2025 · 1 comment
Open

Store envelope actions in a debounced queue #10725

st3iny opened this issue Feb 18, 2025 · 1 comment

Comments

@st3iny
Copy link
Member

st3iny commented Feb 18, 2025

Is your feature request related to a problem? Please describe.

Let's say I delete multiple envelopes in rapid succession one-by-one. This would cause many small requests to be sent to the backend which cause a lot of unnecessary connection to the IMAP server. Operations should be bundled in larger chunks.

Requires #10280

Describe the solution you'd like

Implement an envelope action queue in the frontend. Have a debounced flush timer that sends all similar actions in one big chunk to the backend, e.g. wait for a second without interaction and send all deletes at once.

Describe alternatives you've considered

No response

Additional context

This require extensive refactoring of our frontend. An action queue probably means to have a good abstraction over all possible envelope actions that have to be stored centrally. We would also need to think about handling errors (rollbacks?).

@SebastianKrupinski
Copy link
Contributor

Great idea! 😉

We could also try bulking all actions (sending excluded), just like a desktop client.

Most mail clients cache the actions then perform all the actions at once every few minutes. We could... Every minute during the background sync, send all the actions, then sync the mailboxes. This would really cut down on the amount of connections made to the mail server, connect once do everything and return the results.

One thing we would need to do is detect if the user closed the browser/tab or navigated to a different URL and send the actions cache, so that any action in the last minute do not get lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants