ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.14k stars 152 forks source link

bridge 3.5.1 takes ages for synch #431

Open mattiaverga opened 10 months ago

mattiaverga commented 10 months ago

Like every time a bridge update is available, my vault got corrupted and I was forcibly logged out. I therefore decided to upgrade from bridge 3.4.2 to 3.5.1 (using RPM package from github), but after having logged in I noticed bridge 3.5.2 takes ages to synchronize: I observed a download rate of ~16Kbps and after 10 minutes of synch the percentage was just about 2%. Downgraded to bridge 3.4.2 again, logged in and observed a download rate of ~700Kbps and 40% after 10 minutes.

LBeernaertProton commented 10 months ago

@mattiaverga There are fixes in 3.5.0 to which should address the corrupted vault problem.

There sync stage in 3.5 has been re-written to reduce proton server load and to better handle HTTP responses such as 429 and 5xx. Unless the Proton server tell Bridge they are too busy, you should experience an average reduction of sync speeds around 4x.

Without access to the logs, I can't say for certain what issue is you are experiencing, but it could be that you are running into network errors or the server is throttling the requests.

mattiaverga commented 10 months ago

Without access to the logs, I can't say for certain what issue is you are experiencing, but it could be that you are running into network errors or the server is throttling the requests.

I don't have the logs anymore, since I've reset bridge and cleaned cache and everything the last time. But I have done back and forth between 3.5.1 and 3.4.2 multiple times and I always seen that speed difference between the two, so I think this is definitely due to throttling.

Unless the Proton server tell Bridge they are too busy, you should experience an average reduction of sync speeds around 4x.

Well, if this is done by purpose by throttling request to the server... it is really disappointing! Right now, with 3.4.2 it takes ~25 minutes to full synch my mailbox, that means that with 3.5.x it will take 2 hours (but based on the speed I've actually seen it will take a lot more).

LBeernaertProton commented 10 months ago

Well, if this is done by purpose by throttling request to the server...

Maybe I didn't explain myself correctly, but by throttling I didn't mean the Bridge is the one deciding when to throttle, but the Proton servers. Which could happen to high server loads or other factors beyond the bridge's control.

Based on your estimates I expect your sync to take in between 1h to 1h30m, assuming you have a stable connection during that time and the proton servers are not overloaded.