Commit 99d4e00
committed
feat(storybook): add a process-isolated block-memo comparison
- BlockMemoCompareIsolated renders each side in a cross-site iframe
with a THREE-WAY split — host on localhost, memo side on 127.0.0.1,
legacy side on [::1] — so Chrome's site isolation gives every party
its own renderer process: no shared main thread, GC, or frame loop
between the sides, and fps / slow frames / long tasks become
genuinely per-side metrics.
- three-way is load-bearing, not decoration: with a two-way split the
side sharing the host page's process absorbs the host UI's work,
measured as a stable ~330 ms penalty (~60% of a small-payload run)
whose sign flipped exactly when the side hosts were swapped. [::1]
availability is probed at mount with a degraded, explicitly flagged
two-way fallback; the host also quiesces during runs (snapshots
buffer in refs, flushed at 500 ms) so its own rendering stays out of
the measurement window.
- BlockMemoSide is the addressable single-side story (configured via
bmcMode/bmcSpy/bmcScheme URL params, driven over postMessage);
isolatedProtocol.ts documents the message contract and the
cross-site rationale. The verdict/summary/history UI is shared with
the same-page story — keep both: same-page is the fairest JS-layer
A/B, isolated answers per-side browser-level questions, and
disagreement between them measures the coupling itself.1 parent 73c8eba commit 99d4e00
4 files changed
Lines changed: 768 additions & 0 deletions
File tree
- packages/core/stories
- streaming
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
191 | 245 | | |
192 | 246 | | |
193 | 247 | | |
| |||
0 commit comments