Open DhanyaHerath opened 3 weeks ago
Triage, setting priority as must have to priorities refinement
Needs investigation, what is the breakdown of sync outs for small new sites. The goal is to try and reduce number of records needed to be sent so let's see if we can identify any low hanging fruit. Also discussed trying out connection timeout in reqwest crate and maybe do retries of connection.
During dev test day, me and @lache-melvin had issues initialising tablets, it was very slow and sometimes connection would be stuck for a long time, only to show up with retry
. I did some investigation and even put caddy between mSupply and the outside world to setup timeouts, this didn't really have any effect. I added logging and saw that when connection is being 'timed' out, there wasn't even any caddy logs present (so was outside control of central servers).
There is a way to set connection timeout for reqwest, using client builder, while I was trying to set timeouts and replies I stumbled accros gzip header, in reqwest docs looks like it's not automatically turned on, and need gzip features for it to be enabled: https://docs.rs/reqwest/latest/reqwest/struct.ClientBuilder.html#method.gzip
In this branch I experimented with gzip, connection timeout and retries, and batch size increase. I did a few benchmarks connecting to the same central servers on debug build apk and it looks like it's 100-150% faster. I don't think the timeout and connection is helping, because today I never got the 'retry' msg.
Conclusions
gzip
gzip
and connection retry to Mark G
for someone to try in country (it would need to be 1.7 I think), if there is significant improvement then we should add batch size settings and connection timeout/retry setting on initialisation screen.I'll start a KDD for the original question - how can we reduce the amount of unnecessary records being sent?
What went wrong? π²
From Mark G:
Expected behaviour π€
How to Reproduce π¨
Steps to reproduce the behaviour:
Your environment π±