-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nearby activity feels slow, performance issues #6038
Comments
Throughout this comment, I will use the terms "pins: initial loading" and "pins: details loading" to refer to the two stages in which pins are loaded in nearby. Spent the greater part of my day trying to fix UI slowdowns (caused mostly by flawed "pins: details loading" implementation). Rewrote most of the "pins: details loading" logic, the existing implementation of which was computationally inefficient in part and also prone to race conditions. @nicolas-raoul can you try out the branch and confirm whether the UI slowdowns have lessened? Stuff that's still left to account for:
I'd like to expound upon the last point above, and also suggest fixes. Creating a new issue for the same... EDIT: Done #6044 |
@savsch I just tested your repo, it seems so much faster! 🎉 |
With your repo:
|
I spotted another improvement opportunity.
Instead, I would suggest this algorithm:
Current behavior, observe how the big group of pins near Kilwa becomes grey and stays gray for 40 seconds despite being available in cache: screen-20241219-164239.mp4 |
Still on your repo, I sometimes see the loading icon forever: screen-20241219-103626.mp4 |
Still on your repo, after leaving Nearby open for 10 minutes, it suddenly crashed:
|
Thanks for the feedback.
Yup, had this at the back of my mind as well. Also, made the pin-loading parallel, so 3 batches (each sized 3 itself) will be processed at once (i.e. 3 parallel connections). That seems to work better for me.
Couldn't reproduce it on my current HEAD. Maybe it's because I've removed the hacky The logical work is done I suppose, just adding javadoc is left, and some tests won't compile yet because of the changes. Going to make a draft PR. |
With the current HEAD, it should not happen any more frequently than it does on the current main. Even if it does happen, I am likely to replace the existing loading icon implementation, as it's a bit hacky in my opinion (relies on Handler.postDelayed and static variables), when working on #6044. |
Some issues have been identified, feel free to report others:
The text was updated successfully, but these errors were encountered: