Conversation
…stering and configurable badge formatting - Implement SuperClusterAlgorithm with a bottom-up hierarchical zoom pyramid powered by FlatKdTree flat contiguous arrays, enabling sub-millisecond viewport queries on 100k+ markers with minimal GC allocation. - Support location updates, dynamic item addition/removal, and custom cluster radius configuration. - Add configurable non-zero digit precision (maxNonZeroDigits), compact SI unit formatting (k/m and K/M), and exact count toggling (showExactCount) to DefaultClusterRenderer and DefaultAdvancedMarkersClusterRenderer with automatic icon cache invalidation. - Add SuperCluster100kDemoActivity showcasing 100,000 markers in California and 1,000,000 markers across the United States, unclustered gremlin markers, logarithmic color stops, and an interactive cluster settings dialog. - Add quick dataset switcher with opaque card styling and background coroutine loading indicators. - Include comprehensive performance benchmarks and architecture documentation in README files. - Add full unit test coverage validating FlatKdTree, SuperCluster spatial partitioning, location updates, mathematical invariants, and renderer label formatting.
dkhawk
force-pushed
the
feat/supercluster-algorithm
branch
from
September 30, 2026 03:33
7441365 to
6d9edd7
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces
SuperClusterAlgorithm, a high-performance hierarchical greedy clustering algorithm designed to handle 100,000 to 1,000,000+ markers on Android with sub-millisecond query performance and minimal garbage collection pressure. It also adds configurable cluster badge precision and compact formatting to bothDefaultClusterRendererandDefaultAdvancedMarkersClusterRenderer, alongside an interactive sample demo.Key Additions & Features
SuperClusterAlgorithm&FlatKdTree:DoubleArray,IntArray).QuadItem,HashSet,HashMap) during runtime pan/zoom, preventing ART GC pauses.Cluster Renderer Formatting Enhancements:
maxNonZeroDigits: Int(default:1) for configurable significant digit precision (e.g.,5,10+,50+,100+,1k+).showExactCount: Boolean(default:false) to display exact item counts only when explicitly requested.useCompactNumberFormatting: BooleanandcompactUnitUppercase: Booleanfor SI notation (k/mvsK/M).clearIconCache()andforceReclusterinvalidation on property mutation.SuperCluster100kDemoActivity:Tests & Documentation:
clustering/README.md.