Skip to content

Nearby: No longer keeps loading until timeout when map is zoomed out #6070

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

Merged
merged 9 commits into from
Dec 24, 2024

Conversation

savsch
Copy link
Contributor

@savsch savsch commented Dec 23, 2024

Description (required)

Fixes #6044

Put briefly, the map now only searches in up to 300km radius centered on the screen's center.

The change wasnn't that simple, as loading the list of items even for a 50km radius can result in timeout for some locations, so I implemented an algorithm based on binary search to figure out the appropriate radius to list items inside, by first making some COUNT queries. Also, the centermost pins now appear on top.

Tests performed (required)

Tested BetaDebug on Medium Phone AVD and a Physical Device with API levels 34 and 33 respectively.

Screenshots (for UI changes only)

recording_2024-12-24_03.18.25.mp4

@nicolas-raoul
Copy link
Member

Looks fantastic! I am trying it now.

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work, Nearby is now really convenient to use even when checking remote places!

After browsing the map for 10 minutes (not doing anything else such as uploads) the app becomes slower and slower, so there might be some memory issues. But it is definitely a huge improvement compared to previous map slowliness.

Thanks a lot!

@nicolas-raoul nicolas-raoul merged commit 369e79b into commons-app:main Dec 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nearby: Flawed initial loading of pins.
2 participants