SDK performance measurements
Measured on 30 November 2026 against the local Docker development preview at http://127.0.0.1:54356. These are development measurements, not a production capacity guarantee or a hardware-accelerated device benchmark.
Reproduce and inspect
npx playwright test -c tests/performance/playwright.config.ts
node tests/performance/summarize.mjs
Tests run one Chromium worker. The preview must serve the SDK, standard/nature/dark styles, local glyphs/sprites, worker and the existing Denmark PMTiles fixture. Tests fulfill only their host HTML and synthetic custom SVG icon; all basemap data and styles come from the real local service. The SDK receives explicit test configuration; production authentication is covered separately by platform integration tests.
Evidence is written to artifacts/performance/: results.json contains the matrix, dense-results.json the simultaneous-render stress, lifecycle-results.json repeated teardown/input checks, summary.json aggregate measurements, and PNGs visual evidence. Each matrix trial checkpoints its results. Failures retain Playwright traces. Synthetic records are generated deterministically and do not represent real customer locations.
Environment: Windows 10.0.26300, Intel Core i9-12900K, 24 logical CPUs, 63.68 GiB RAM, Chromium 159.0.8154.6, viewport 1366 × 768. WebGL reports ANGLE/Vulkan SwiftShader Device (Subzero). This is software rendering on a powerful development workstation; other development work may run concurrently. OS/file caches are warm and the network is loopback. Independent browser contexts isolate SDK instances but do not simulate distant mobile networks.
Matrix and budgets
The 16 basic combinations cover 100, 1,000, 10,000 and 50,000 records, each with generated default pins or one cached custom SVG, and GPU clusters or an advanced HTML cluster factory capped at 60 elements. The 1,000/default/GPU and 50,000/SVG/HTML cases run three times each, producing 20 trials. This is a functional regression sample, not a statistically representative load study.
Each trial awaits actual renderer readiness/idle; filters half the records and restores them; moves to zoom 16 to exercise bounded HTML clusters; moves to zoom 17 to render unclustered features; pans; replaces the entire dataset with changed positions/titles; and destroys the map. Source submission alone does not stop the timer. Camera/source operations wait for rendering and tile work. MapLibre's normal fade settling contributes to these durations.
Environment-specific regression gates are first view ≤5 seconds, each matrix operation ≤3 seconds, at most one custom-icon download, at most 60 HTML cluster elements, no page exception/external origin request, and cold-context post-destroy main-thread heap growth ≤40 MiB. The dense worst case uses 10-second view/update gates. These are explicit test budgets, not product SLAs.
Observed final matrix ranges across all icon/cluster variants and repeats:
| Records | Trials | First view, ms | Worst full update, ms | Worst filter, ms | Peak sampled JS heap, MiB | Largest HTML cluster DOM count |
|---|---|---|---|---|---|---|
| 100 | 4 | 661–1,287 | 643 | 393 | 29.9 | 5 |
| 1,000 | 6 | 782–1,293 | 643 | 394 | 27.1 | 4 |
| 10,000 | 4 | 715–1,427 | 635 | 778 | 49.8 | 60 |
| 50,000 | 6 | 1,074–1,842 | 1,216 | 933 | 102.1 | 60 |
All 20 matrix trials met these gates. Every custom SVG case fetched the shared icon once, including after dataset replacement. Approximately 31–32 requests and 3.30 MiB of declared response lengths were recorded per trial across initialization and operations; no third-party requests occurred. This count includes the SDK/worker/local assets and fixture requests. Declared Content-Length totals are not a complete transport-level wire accounting.
The matrix geographically distributes records near Aarhus. Only 1, 6, 57 and 287 unique icon features respectively lie in its narrow zoom-17 viewport. All input records are indexed/clustering inputs, but they are not all simultaneously on screen. The following separate test covers that distinction.
Fifty thousand simultaneously visible pins
The dense test explicitly disables clustering at zoom 17 and places all 50,000 records within the viewport. It asserts 50,000 distinct rendered feature IDs, then 25,000 after filtering, for both default and custom SVG icons. It uses actual Denmark tiles underneath the overlapping pins.
| Icon | First actual view | Filter half | Replace/restore all | Frame-gap p95 | Longest frame gap |
|---|---|---|---|---|---|
| Generated default | 1,826 ms | 1,451 ms | 2,160 ms | 150 ms | 550 ms |
| Custom SVG | 1,905 ms | 1,730 ms | 2,519 ms | 150 ms | 667 ms |
Both cases met the stated 10-second gates, and SVG downloaded once. Heavy overdraw visibly reduces software-rendering smoothness: these results do not meet a 60 fps target. Keeping 50,000 overlapping pins simultaneously visible is also difficult to read. Default clustering, category/group filters and selecting an appropriate map view are the supported tools for reducing that load. GPU memory, worker memory and dedicated-device frame rates require additional profiling.
Interaction and lifecycle
Five create/update/destroy cycles reuse one page after warming the SDK with an empty map. Each cycle loads 10,000 records and performs three complete updates. Playwright sends actual Enter key events to a focused probe while each update is pending. Main-thread keydown queue delay was median 56.4 ms and maximum/p95 73.6 ms across 15 samples, below the environment's 250 ms gate. This measures event dispatch queue delay, not standardized INP or complete input-to-paint latency.
After explicit garbage collection, post-destroy main-thread JS heap rose from 13.17 to 14.09 MiB over cycles 1–5, a 0.92 MiB difference, below the 15 MiB warm-cycle gate. DOM node counts stayed at 150 and event-listener counts at 26. All SDK canvases were removed. The remaining page/module/browser objects are included in those counts. The broader fresh-context matrix retains SDK code/cache allocations, so its cold-context heap delta is not a leak measurement.
Heap values come from Chromium DevTools main-thread metrics. They exclude worker heaps, native allocations, GPU resources and browser process RSS; short-run stable counts do not prove the absence of all leaks. Matrix animation-frame p95 gaps were approximately 33–50 ms, while the dense case was substantially slower. Measurements include source processing, network waits, fade settling and rendering; no isolated CPU microbenchmark or hardware acceleration guarantee is implied.
Remaining validation
Production acceptance still needs representative customer hardware, real network latency/bandwidth, sustained soak tests, worker/native/GPU memory profiling and the intended mix of custom icon sizes and category partitions. Arbitrary host HTML factories and an enabled 50,000-item accessible DOM list are not benchmarked here; bulk GPU markers and bounded HTML clusters are the tested scale path. Production token/CORS correctness is covered by separate authenticated browser/HTTP integration, not the explicit-config fixture.