diff --git a/Cargo.lock b/Cargo.lock index 69ae6ec..a9bd560 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -31,7 +31,7 @@ dependencies = [ "actix-utils", "base64", "bitflags 2.10.0", - "brotli", + "brotli 8.0.2", "bytes", "bytestring", "derive_more 2.0.1", @@ -414,6 +414,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "brotli" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor 4.0.3", +] + [[package]] name = "brotli" version = "8.0.2" @@ -422,7 +433,17 @@ checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor", + "brotli-decompressor 5.0.0", +] + +[[package]] +name = "brotli-decompressor" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a334ef7c9e23abf0ce748e8cd309037da93e606ad52eb372e4ce327a0dcfbdfd" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] @@ -3117,6 +3138,7 @@ version = "0.1.0" dependencies = [ "actix-web", "actix-ws", + "brotli 7.0.0", "bytes", "dirs", "flate2", diff --git a/doc/frontend_improvements.md b/docs/frontend_improvements.md similarity index 84% rename from doc/frontend_improvements.md rename to docs/frontend_improvements.md index 8e0f34d..b6397d6 100644 --- a/doc/frontend_improvements.md +++ b/docs/frontend_improvements.md @@ -327,21 +327,32 @@ quadrantChart ``` ### Quick wins (low effort, high impact) -1. Reduce `backdrop-filter` usage (13 blur instances) -- immediate paint perf gain -2. Add `contain: content` / `content-visibility: auto` to inactive tabs -3. Add `Cache-Control` headers to static assets -4. Cache remaining DOM references in the render path +1. ~~Reduce `backdrop-filter` usage (13 blur instances)~~ **DONE** -- replaced with solid backgrounds, blur preserved for modals only, `prefers-reduced-motion` gate added +2. ~~Add `contain: content` / `content-visibility: auto` to inactive tabs~~ **DONE** -- containment added for inactive tabs, spectrum/waterfall containers, map, statistics +3. ~~Add `Cache-Control` headers to static assets~~ **DONE** -- upgraded to `public, max-age=31536000, immutable` +4. ~~Cache remaining DOM references in the render path~~ **DONE** -- `tabMainEl` and other hot-path refs cached at module level ### Next phase (moderate effort) -5. Split theme CSS into a separate lazy-loaded file -6. Self-host DSEG14 font -7. Pre-compute `color-mix` results as CSS variables -8. Field-level diffing in the SSE render function -9. Replace `innerHTML` with DOM APIs in hot paths +5. ~~Split theme CSS into a separate lazy-loaded file~~ **DONE** -- theme blocks extracted to `/themes.css`, lazy-loaded via `` +6. ~~Self-host DSEG14 font~~ **DONE** -- `@font-face` with `font-display: swap` added to `style.css`, CDN preconnect/preload removed from HTML +7. ~~Pre-compute `color-mix` results as CSS variables~~ **DONE** -- common mixes pre-computed as `--btn-hover-bg`, `--btn-active-bg`, etc. +8. ~~Field-level diffing in the SSE render function~~ **DONE** -- `prevRenderData` tracks freq/mode/ptt/meter, active-tab-aware skip logic added +9. ~~Replace `innerHTML` with DOM APIs in hot paths~~ **DONE** -- 15+ `innerHTML = ""` replaced with `replaceChildren()` ### Longer-term -10. Split `app.js` into ES modules with lazy loading -11. Lazy-load plugin scripts and Leaflet on demand -12. Use `