From 46033761a64939a8caaad7cff6c3e87bb74cd9fe Mon Sep 17 00:00:00 2001 From: Jeremy Collins Date: Wed, 1 Jul 2026 20:55:20 -0400 Subject: [PATCH] perf(web): increase tile cache zoom levels and reduce fade duration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit maxTileCacheZoomLevels 5→20 covers the full z3.5–18 range so switching between overview and approach scales hits the cache instead of re-requesting. fadeDuration 300→100ms so newly-loaded tiles appear faster during pan. Co-Authored-By: Claude Sonnet 4.6 --- web/src/chart-canvas/chart-canvas.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/src/chart-canvas/chart-canvas.mjs b/web/src/chart-canvas/chart-canvas.mjs index 9d0795b..65d94b3 100644 --- a/web/src/chart-canvas/chart-canvas.mjs +++ b/web/src/chart-canvas/chart-canvas.mjs @@ -335,6 +335,14 @@ export class ChartCanvas extends HTMLElement { // Attribution bottom-left so the bottom-right corner is free for the app's // scale/zoom readout. attributionControl: { position: "bottom-left" }, + // Keep tiles across the full zoom range (z3.5–18 = 15 levels) so zooming in + // and out finds previously-rendered tiles already in cache rather than + // re-requesting them. The default (5) is too narrow for a chart plotter where + // users routinely swing between overview and approach scales. + maxTileCacheZoomLevels: 20, + // Tile fade-in duration. The default 300ms makes pan feel laggy as new tiles + // fade in slowly; 100ms is still smooth but noticeably snappier. + fadeDuration: 100, }); this._map = map; this.map = map; // public handle