lichess-org / lichobile

lichess.org mobile application
https://lichess.org/mobile
GNU General Public License v3.0
2.02k stars 318 forks source link

Extremely slow networking on Android #2298

Open skorokithakis opened 1 year ago

skorokithakis commented 1 year ago

Describe the bug

The mobile app on Android (a Xiaomi Poco F4) is extremely slow to network. This isn't a network issue, the website is basically immediately responsive, while the app might take 2-3 seconds on every API call. Sometimes I switch between site and app multiple times in one session to compare, and the app always has terrible lag while the site is always very snappy.

This happens on any WiFi network I'm on (mine or others'), and even on mobile data.

To Reproduce

Reproduction is hard, as I assume it only happens on specific phones.

Smartphone (please complete the following information):

Additional context

This is a particularly insidious problem, as it only happens to some people. Unfortunately I can't debug, as it's not a phone network issue, and doesn't seem to be CPU-related as well. I suspect that the app is trying IPv6 first and timing out, or something similar.

skorokithakis commented 1 year ago

I've recorded a video of how slow the app sometimes gets, compared to the site. It seems to be transient, but can sometimes persist for many minutes, with everything taking 3-5 seconds to load:

https://user-images.githubusercontent.com/23648/216867724-d4e45223-870a-40f6-9514-591052e493bc.mp4

skorokithakis commented 1 year ago

Here's another one where the app is very slow but the site is instant:

https://user-images.githubusercontent.com/23648/217125963-efa25525-3750-436c-bd77-58a81657fd00.mp4