status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.88k stars 984 forks source link

App is unresponsive for a few seconds right after login #20283

Open flexsurfer opened 3 months ago

flexsurfer commented 3 months ago

After login we fetch all the communities, big communities have a lot of data and it might take up to a tens of a second to load and "parse" them, and app is unresponsive for that time

There are the steps to fix that:

Actual results

Can be consistently replicated in some Android devices.

https://github.com/status-im/status-mobile/assets/46027/dd8de18d-48b0-474f-bf24-a548b1acf527

yqrashawn commented 2 months ago

This also happens to discover community. I guess featured communities will be mostly large communities in the future.

https://github.com/status-im/status-mobile/blob/develop/src/status_im/contexts/communities/discover/events.cljs#L78

flexsurfer commented 2 months ago

Related issue, with some numbers https://github.com/status-im/status-mobile/issues/20231

ilmotta commented 1 month ago

This week I will give this issue a shot because the freezing can put the app in an unrecoverable state and the user may need to close, reopen the app, and realize they need to wait before pressing on buttons for many seconds, which is a bit too much to ask from users (this is what happened to me and @pavloburykh)

If I don't find any quick solution I'll at least try to paste results that help us pinpoint the actual cause. Could be an amalgamation of causes, in which case it will be difficult...

flexsurfer commented 1 month ago

this one is very effective and quick solution https://github.com/status-im/status-mobile/issues/20285

ilmotta commented 1 week ago

@flexsurfer This issue has been largely mitigated because we eliminated the bottleneck to process upfront all community members after login. I remember @pavloburykh also saw significant improvements on midrange Android phones. Even though there are other potential improvements, can we consider this issue sufficiently solved and close the issue? Or are we still seeing long freezes?

flexsurfer commented 1 week ago

I am looking at it from a technical perspective and believe there is still room for improvement, but we can ask @pavloburykh what he thinks. Given the current situation, my opinion is that communities should be disabled on mobile devices, and therefore, this task is no longer relevant.

ilmotta commented 1 week ago

Given the current situation, my opinion is that communities should be disabled on mobile devices, and therefore, this task is no longer relevant.

We may end up disabling communities on mobile, but seems premature now. One reason @flexsurfer is that community features drive retention as we can see from user's messages. And some users are installing the desktop app, enabling the flag to manage communities and creating their own communities, which is nice because they can provide valuable feedback to us.