diff --git a/docs/API_CONTRACTS.md b/docs/API_CONTRACTS.md index e130892..e979191 100644 --- a/docs/API_CONTRACTS.md +++ b/docs/API_CONTRACTS.md @@ -97,3 +97,7 @@ Netlify helper responses use: ## Nullable event/source metadata (October 12 repair candidate) Canonical source occurrence/publication/update/verification clocks are ISO strings or null, and legacy/UI clocks are epoch milliseconds or null. Ingestion/generated clocks describe processing, never source observation. Confidence is numeric (including legitimate zero) or null. Unknown source freshness is null. Source/provider URLs are absolute HTTP(S) without embedded credentials or null; invalid supplied ingestion URLs produce errors and raw imported UI links remain unavailable. Existing route names/envelopes are preserved. See [repair capability and editing guide](AUDIT_REPAIR_2026-10-12.md). + +## Local unknown severity candidate (2026-11-02) + +Canonical severity is nullable; absent or invalid severity has label `unknown`. Legacy events carry `severity: unknown` and `severityScore: null`; numeric zero remains low with score zero. Unknown can be selected explicitly in severity filters and sorts after known zero. Country risk counts `unknownSeverityEvents` and excludes them from severity-weighted pressure, with a limitation notice; this does not imply safety. Threat and all-unknown clusters remain unscored. Known label mappings are 20/45/70/90 on the canonical 0-100 scale. Confidence, freshness and impact retain separate fields. No feeds or hosting policy changed. diff --git a/docs/GLOBE_PERFORMANCE_LOCAL_2026-10-30.md b/docs/GLOBE_PERFORMANCE_LOCAL_2026-10-30.md new file mode 100644 index 0000000..2dc859d --- /dev/null +++ b/docs/GLOBE_PERFORMANCE_LOCAL_2026-10-30.md @@ -0,0 +1,42 @@ +# Local globe repeat-work measurement + +Baseline: `390b9a6b79bc89b03baf03f4fe4b1e02aed29384`, origin `https://github.com/Zacharon/live-map.git`. Candidate exists only in orchestrator-bound `perf/globe-local-20261030`; no canonical application, push or deployment. + +## OBSERVED + +- `src/map/globe-controller.js:setGlobeMode` called `webglAvailable()` on every render. `src/map/cesium-adapter.js:19-30` creates a temporary canvas/context and releases it. Twenty synthetic chokepoint toggles produced 24 and 22 WebGL getContext calls, consuming 182.0 and 133.2 ms inside getContext alone. +- The focused change reuses `globeHandle.ok` while a viewer exists. Forced failure and context-loss guards take precedence; teardown clears the handle so a new probe occurs. +- Same scenario after the change produced zero repeat probes in both initial and verification runs. Rotation and viewer identity passed. No overall latency speedup is established: repeat elapsed times varied. +- Startup source path: index.html loads Leaflet and markercluster before app.js; app.js statically imports app-controller.js and its dependency graph. Cesium loads dynamically from cesium-adapter.js:118 onward, with an IIFE fallback. Resource durations do not isolate JS parse/evaluation time. +- Initial baseline Cesium module resource duration was 5245.6 ms for 4,754,611 transferred bytes, versus 151.7 ms on reload. The later cold-cache sample was 137.1 ms. OS/filesystem/antivirus/process warmup are uncontrolled; this is not evidence of an optimization to Cesium transfer or parsing. + +| Sample | First renderer-ready ms | 20 toggles elapsed ms | Repeat probes | +| --- | ---: | ---: | ---: | +| Before, cold browser cache | 6776.3 | 1755.8 | 24 | +| Before, warm process reload | 1117.8 | 1459.6 | 22 | +| After, cold browser cache | 1667.2 | 1646.1 | 0 | +| After, warm process reload | 1119.3 | 1173.6 | 0 | +| Verification, cold browser cache | 1936.3 | 1826.8 | 0 | +| Verification, warm process reload | 1210.1 | 1617.0 | 0 | + +Readiness is a 10 ms sampled renderer signal, followed by an explicit camera rotation assertion, not a user-input-to-photon metric. The loopback server sends no-store, so warm means process reload, not an HTTP asset-cache hit. + +## Reproduce and correctness + +Raw local evidence: [before](../artifacts/globe-performance/before.json), [after](../artifacts/globe-performance/after.json), [verification and regressions](../artifacts/globe-performance/after-verified.json). These generated artifacts are ignored by Git and remain in this local checkout. + +`node scripts/measure-globe-local.mjs