The 'show estimated current coverage' toggle pushes 1-8k grid cells
to the browser at 5.76 GHz+ and previously rendered each as its own
SVG <path> via Leaflet's default vector renderer. That meant 1-8k
DOM nodes plus per-element layout/paint on every pan/zoom — enough
to lock up tabs on mid-range hardware.
Two changes:
1. All coverage rects share a single L.canvas({padding: 0.2})
renderer. Browser sees one <canvas> element drawn in one pass
per redraw instead of thousands of <path> nodes. Hit-testing for
tooltips still works through Leaflet's canvas-renderer mouse
events.
2. Drop `sticky: true` from the tooltip binding. Sticky tooltips
reposition to follow the cursor on every mousemove, which scales
O(N) with cell count — across thousands of rects that becomes the
dominant cost as the cursor moves. Without sticky, the tooltip
anchors to the cell's centre on hover (same info, cheaper).
|
||
|---|---|---|
| .. | ||
| css | ||
| js | ||
| vendor | ||
| tsconfig.json | ||