mirror of
https://github.com/spartanz51/tutabridge.git
synced 2026-06-24 10:54:32 +02:00
d3b0f4a0778067a1c16376f9cc18798a03fcafe4
The syncer ran one loop: phase 1 (folder list + mail-id lists) then phase 2 (body prefetch). On a large mailbox the cold prefetch pass takes many minutes, so the next folder refresh was stuck behind it and new folders/mail only showed up after a restart. Split into two independent loops sharing the store: a fast list_sync_loop (folder list + mail ids, ~every SYNC_INTERVAL) and a slow prefetch_loop (bodies, background). Folder and new-mail refresh no longer wait on prefetch. Live-tested: a folder created while the bridge runs appears over IMAP in ~18s, no restart.
Languages
Rust
89.5%
TypeScript
5.9%
CSS
2.5%
Python
1.2%
Shell
0.7%
Other
0.1%