Skip to content

feat(clustering): add incremental item diffing - #1037

Open
RotBolt wants to merge 1 commit into
googlemaps:mainfrom
RotBolt:feat/clustering-item-key
Open

RotBolt wants to merge 1 commit into
googlemaps:mainfrom
RotBolt:feat/clustering-item-key

Conversation

@RotBolt

@RotBolt RotBolt commented Oct 8, 2026 •

Copy link
Copy Markdown

Summary

  • Add an optional stable key to clustering; use item equals/hashCode when no key is supplied.
  • Diff additions, removals, and changed values, avoiding full refreshes when items are unchanged.
  • Add unit/instrumentation coverage and a 5,000-item frequently updated demo.

Fixes #504

Validation

  • :maps-compose-utils:testDebugUnitTest
  • :maps-app:connectedDebugAndroidTest for GoogleMapViewClusteringTests (6/6 passed on Motorola Edge 50 Neo)
  • :maps-compose-utils:lintDebug :maps-app:lintDebug
  • Manually tested the 5k keyed-diff demo on Motorola Edge 50 Neo with Maps tiles loaded; observed repeated 100-item updates and the algorithm retaining 5,000 items.

Manual verification

image

@RotBolt
RotBolt force-pushed the feat/clustering-item-key branch 2 times, most recently from 52a1912 to ba19eb9 Compare October 8, 2026 18:48
@RotBolt
RotBolt marked this pull request as ready for review October 8, 2026 18:54
@RotBolt

RotBolt commented Oct 8, 2026

Copy link
Copy Markdown
Author

@kikoso Please review this PR for adding clustering increamental item diff

@RotBolt
RotBolt force-pushed the feat/clustering-item-key branch from ba19eb9 to fc84cf6 Compare October 8, 2026 18:55

This branch has not been deployed

No deployments
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.

Clustering should support diff util

2 participants