googlemaps / googlemaps/android-maps-compose

Slow Composition and Unnecessary Recompositing of Google Maps with Custom Clusters

Offen
#449 6 Kommentare 27 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
priority: p1 type: question
Vorherrschende Sprache
Kotlin
Sterne
1.3k
Forks
181
Ø Merge
2 T. 23 Std.
Gemergte PRs (30 T.)
18

Beschreibung

I've used Google Maps on XML (Views) with Cluster Manger with my customization. I decided to migrate to Compose Maps and Custom Clusters, I'm still using View-based Cluster Manager, but that doesn't affect my issue.

The issue is, that the map loads slowly on Composable Screen, one of the Bottom navigation screens.
Every navigation from another screen and coming back to the same map screen reloads the map, but the markers are loaded on time. I've already handled it. The map looks like a mesh grid some of the time, clustering markers take a couple of seconds and lag for second as well, and after that, it works smoothly.
Unlike Views, it's not caching the map and the markers well, is there any workaround?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduziere das Problem, indem du im Bottom-Navigationsbereich vom Composable-Kartenbildschirm weg- und wieder zu ihm navigierst und dabei das Laden der Karte, das Clustering der Marker und die erneute Komposition beobachtest. Vergleiche dieses Verhalten mit der bestehenden View-basierten Implementierung und untersuche den Lebenszyklus des Compose Maps-Bildschirms sowie die Integration des benutzerdefinierten Clusters. Erledigt ist die Aufgabe, wenn die Ursache für das erneute Laden und die Verzögerung identifiziert und ein verifizierter Workaround oder Fix dokumentiert ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, kotlin
Bereich
mobile, performance
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.