Skip to content
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

Memory usage skyrockets at very high zoom levels (>20), leading to frame rate degradation and OOM #3107

Open
sargunv opened this issue Dec 24, 2024 · 3 comments

Comments

@sargunv
Copy link
Collaborator

sargunv commented Dec 24, 2024

Describe the bug

Performance (frame rate) of the map degrades at very high zoom levels (> 20). Past 25, it gets down to even 1-2 fps on a modern flagship-tier phone. It's the same on both Android (Galaxy Z Fold 6) and iOS (iPhone 16 Pro) though perhaps a bit more severe on Android.

To Reproduce

Load up the map and zoom really far into a busy city.

Used openfreemap styles, listed here:

https://github.com/sargunv/maplibre-compose/blob/abd256c867bfa7ae5aa8fc91b3be1caace0f6535/demo-app/src/commonMain/kotlin/dev/sargunv/maplibrecompose/demoapp/util.kt#L26-L36

The one in the video below is https://tiles.openfreemap.org/styles/bright

Expected behavior

The map should pan just as smoothly as it does at normal zoom levels.

Screenshots

Screen_Recording_20241224_130737_maplibre-compose-demo.mp4

Platform information (please complete the following information):

  • Operating System: Android 14, iOS 18
  • Version: MapLibre Android 11.7.1 and iOS 6.9.0
@westnordost
Copy link
Collaborator

Is this new? I never noticed this before

@sargunv
Copy link
Collaborator Author

sargunv commented Dec 27, 2024

I'm not sure when it started; I noticed it recently but I don't zoom that far often.

I did some telemetry with an Android emulator and noticed native memory consumption skyrockets as I zoom in, eventually crashing the app on the simulator at ~1.1 GB.

I couldn't screen record for some reason, but you can see my double taps to zoom in at the top of the telemetry window. The first tap loads the map (at zoom 13), then each double tap zooms by 1.0, crashing around 25.0.

Image

@sargunv
Copy link
Collaborator Author

sargunv commented Dec 27, 2024

Here's the same test on an iOS simulator. It doesn't get quite as bad because the SDK caps zoom to 22.0 by default, but the trend is the same.

Image

@sargunv sargunv changed the title Performance (frame rate) of the map degrades at very high zoom levels (> 20) Memory usage skyrockets and very high zoom levels, leading to frame rate degradation and OOM (> 20) Dec 27, 2024
@sargunv sargunv changed the title Memory usage skyrockets and very high zoom levels, leading to frame rate degradation and OOM (> 20) Memory usage skyrockets it very high zoom levels, leading to frame rate degradation and OOM (> 20) Dec 27, 2024
@sargunv sargunv changed the title Memory usage skyrockets it very high zoom levels, leading to frame rate degradation and OOM (> 20) Memory usage skyrockets at very high zoom levels, leading to frame rate degradation and OOM (> 20) Dec 27, 2024
@sargunv sargunv changed the title Memory usage skyrockets at very high zoom levels, leading to frame rate degradation and OOM (> 20) Memory usage skyrockets at very high zoom levels (>20), leading to frame rate degradation and OOM Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants