The problem: on my fastest machine, syncing a device that hasn’t been online already takes more than a minute per day.
The impact: This means if a device hasn’t been online for a week, which at least for me happens regularly, it’s unusable for 7+ minutes because sync goes from oldest to newest, so anything I write is at a completely wrong position in the history (since it gets inserted wherever the sync has gotten) and I can’t read answers anyway for 7+ minutes until I get to the current time responses.
The ugly: On my slowest device, syncing a day takes up to 15 minutes.
I’m not sure how you would address this. Perhaps one solution might be to sync newest to oldest, and to keep checking for new stuff during sync.
Signal desktop “solves” this by showing a splash screen while syncing.
I think the bottleneck is SQLite doing fsync after each transaction, so it should be possible to speedup by grouping more SQL statements into transactions and doing all writes in the same place, but it is not as easy as it sounds and requires large refactoring.
yeah, it can probably be improved and there are also ideas around that. esp. when using slow server, slow network and/or slow devices.
however, using a fast chatmail server, syncing some 100 messages per day after being offline for some days is usually fine on most devices [1]. that said, i do not see a “fundamental roadblock” here, the issue more queues in with lots of other things
My apologies, but my reasoning was if I need to wait 10-30 minutes to be able to use the app, I thought for many users that’d be somewhat of a fundamental issue.