arn-c0de / arn-c0de/Geograbber

Issue: Marker Rendering Performance on Mobile

Open
#27 1 comment 0 reactions 1 assignee Claimed by @arn-c0de View on GitHub
area: map critical enhancement performance
Dominant language
Java
Stars
29
Forks
3
PR merge metrics
No merged PRs in 30d

Description

# Problem
Thousands of markers cause severe lag on mobile devices—even with 16 GB RAM.

# Root Cause
No clustering. Each device creates 2 DOM nodes (icon + circle). At 3,000+ devices, the DOM collapses.

# Current Pipeline
DB → JSON → Leaflet 1.7.1 (WebView)

├─ L.divIcon per marker (DOM node)

├─ L.circle per marker (DOM node) ← doubles cost

└─ No clustering, no canvas, filter loop is O(n)

# Fixes (Prioritized)

| Fix | Impact |
|-----|--------|
| **P0** Leaflet.markercluster — cluster at low zoom | −90% DOM nodes |
| **P1** Canvas renderer (L.canvas()) instead of SVG/DOM icons | 5–10× paint speed |
| **P2** Hide circles when zoomed out (only show at zoom ≥ 16) | −50% DOM nodes |
| **P3** Lazy popups — build HTML on click, not at load | Faster startup |
| **P4** Defer movement polylines — draw on popup open only | Less startup work |

# Acceptance Criteria
- [ ] 10,000 markers render without frame drops on mid-range Android
- [ ] Filter toggle < 100 ms
- [ ] No regression in search/filter/drag-update

# Key Files
- `MapActivity.java` — Android map + embedded JS
- `Python/start_plot_gui.py` — Python desktop map + embedded JS

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.