Webapp efficiency audit (2026-07-19) — the highest-leverage, lowest-risk wins to make loads/interactions more fluid. Ordered by impact. Full analysis in the audit notes.
Already good (do NOT change): the replay rAF clock, staleTime:Infinity, useLapTelemetries parallel-fetch + signature-memoization, the prewarm pattern, the backend session_cache LRU, nginx hashed-asset cache headers. @tanstack/react-table/react-virtual are already tree-shaken out of the shipped bundle (dead weight in package.json only).
Webapp efficiency audit (2026-07-19) — the highest-leverage, lowest-risk wins to make loads/interactions more fluid. Ordered by impact. Full analysis in the audit notes.
webapp/nginx.confhas nogzip on;(stock nginx:alpine ships it off), so prod users download 1.88 MB instead of ~612 KB. Addgzip on;+gzip_types. ~67% less transfer, 1-line, zero risk. Do first.src/app/router.tsximports every page eagerly; Home downloads every tab.React.lazy()per route + a Suspense boundary → ~300-450 KB gzip off first paint.echarts-for-reactdefault doesimport * as echarts(~1 MB). Switch chart features toecharts/core+echarts-for-react/core+ explicituse([...])(line/gauge/scatter/custom + 7 components) → ~180-220 KB gzip. Pair withmanualChunksso echarts is one shared async chunk.backend/api/v1/endpoints/comparison.py:91-92calls rawfastf1.get_session(...).load()instead ofsession_cache.get_loaded_session(...). This is the real cause of the ~14s cold compare. 2-line fix.prewarmTelemetry) so the fetch is warm by COMPARE.Already good (do NOT change): the replay rAF clock,
staleTime:Infinity,useLapTelemetriesparallel-fetch + signature-memoization, the prewarm pattern, the backendsession_cacheLRU, nginx hashed-asset cache headers.@tanstack/react-table/react-virtualare already tree-shaken out of the shipped bundle (dead weight in package.json only).