Spaces:
Sleeping
Sleeping
Fix black tiles on connect; 64px tiles, byte-based delta choice
Browse files
README.md
CHANGED
|
@@ -69,14 +69,19 @@ v3 instead:
|
|
| 69 |
|
| 70 |
1. **Generates each chrome sprite / wallpaper / icon once**, then composites in
|
| 71 |
pixel space. Diffuse work is amortised out of the interaction path.
|
| 72 |
-
2. **Dirty-tile deltas.** The compositor emits tile-aligned patches
|
| 73 |
-
full frame only when the
|
| 74 |
-
|
| 75 |
-
3. **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
removal), no JSON-wrapping of image data.
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
|
| 81 |
Measured (see below): interaction cost is a `LayerStack` build of **~0.15 ms**
|
| 82 |
and a **~1.9 ms** frame, with **0 cache misses** once warm.
|
|
@@ -86,8 +91,9 @@ and a **~1.9 ms** frame, with **0 cache misses** once warm.
|
|
| 86 |
| Metric | Value |
|
| 87 |
|---|---|
|
| 88 |
| Client payload | 7.8 KB, 0 external requests (v1: React+ReactDOM+Babel+Tailwind ≈ 1.3 MB) |
|
| 89 |
-
| Full frame, 1024×1024 | ~19 KB raw WebP over a binary socket |
|
| 90 |
-
|
|
|
|
|
| 91 |
| Asset cache | 188 hits / 0 misses after warm-up |
|
| 92 |
| Time to first frame, **cold** asset cache | 5.21 s |
|
| 93 |
| Time to first frame, **warm** asset cache | **0.13 s** (≈40×) |
|
|
|
|
| 69 |
|
| 70 |
1. **Generates each chrome sprite / wallpaper / icon once**, then composites in
|
| 71 |
pixel space. Diffuse work is amortised out of the interaction path.
|
| 72 |
+
2. **Dirty-tile deltas.** The compositor emits 64×64 tile-aligned patches over a
|
| 73 |
+
16×16 grid, choosing a full frame only when the estimated patch bytes
|
| 74 |
+
(content + a per-image WebP header) exceed the full-frame estimate.
|
| 75 |
+
3. **Every new client gets a full snapshot first.** The delta stream is shared,
|
| 76 |
+
so a client joining after the first frame was previously left almost blank --
|
| 77 |
+
only the tiles the cursor happened to dirty ever arrived ("black tiles until
|
| 78 |
+
mouseover"). The desktop is now painted for each new socket before the
|
| 79 |
+
(possibly slow) engine load.
|
| 80 |
+
4. **Binary frames.** `[MAGIC][type][u32 hlen][json][webp]` — no base64 (+33%
|
| 81 |
removal), no JSON-wrapping of image data.
|
| 82 |
+
5. **Zero CDN / zero framework.** `index.html` is ~7.8 KB, no external requests.
|
| 83 |
+
6. **Async refinement.** Window content is generated off the input critical path.
|
| 84 |
+
7. **A blocking `Queue.get()`** replaces the old 50 ms busy-wait poll.
|
| 85 |
|
| 86 |
Measured (see below): interaction cost is a `LayerStack` build of **~0.15 ms**
|
| 87 |
and a **~1.9 ms** frame, with **0 cache misses** once warm.
|
|
|
|
| 91 |
| Metric | Value |
|
| 92 |
|---|---|
|
| 93 |
| Client payload | 7.8 KB, 0 external requests (v1: React+ReactDOM+Babel+Tailwind ≈ 1.3 MB) |
|
| 94 |
+
| Full frame, 1024×1024 | ~19.7 KB raw WebP over a binary socket |
|
| 95 |
+
| Cursor-move patch | 732 B on 64×64 tiles (was 2.3 KB on 128×128) |
|
| 96 |
+
| Layer build / frame emit | ~0.17 ms / ~0.8 ms, 1 dirty tile typical |
|
| 97 |
| Asset cache | 188 hits / 0 misses after warm-up |
|
| 98 |
| Time to first frame, **cold** asset cache | 5.21 s |
|
| 99 |
| Time to first frame, **warm** asset cache | **0.13 s** (≈40×) |
|