You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPMENT.md
+18-49Lines changed: 18 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,12 @@ bun install
35
35
-`bun run pre-wrap-check` — compact batched browser oracle for `{ whiteSpace: 'pre-wrap' }`
36
36
-`bun run keep-all-check` — compact batched browser oracle for `{ wordBreak: 'keep-all' }`, including mixed-script no-space canaries
37
37
-`bun run symbol-check` — compact batched Chrome + Safari oracle for no-space symbol runs inside long words
38
-
-`bun run letter-spacing-check` — compact batched browser oracle for `{ letterSpacing }`, using one posted-report probe per browser and covering narrow wraps, combining marks, bidi, CJK, emoji, digits, RTL punctuation, `pre-wrap`, and soft hyphens
38
+
-`bun run letter-spacing-check` — compact batched Chrome + Safari oracle for `{ letterSpacing }`
39
39
-`bun run letter-spacing-snapshot` — refresh `accuracy/letter-spacing.json` from the Chrome + Safari compact `{ letterSpacing }` oracle
40
40
-`bun run probe-check` — smaller browser probe/diagnostic entrypoint
41
41
-`bun run probe-check:safari`
42
-
On a first-break mismatch, probe output now includes a small break trace.
43
-
`sN:gM` means segment/grapheme position, `unit` is that unit's width, `fit` is the cumulative fitted width from the current line start, and `[ours]` / `[browser]` mark the competing break boundaries.
44
-
For Safari URL/query misses or other extractor-sensitive cases, cross-check `--method=span` before changing the engine.
42
+
43
+
Probe output includes a break trace on first-break mismatches. `sN:gM` is a segment/grapheme position; `[ours]` and `[browser]` mark the competing boundaries. For extractor-sensitive Safari cases, cross-check `--method=span` before changing the engine.
45
44
46
45
### Corpus Tooling
47
46
@@ -61,20 +60,12 @@ bun install
61
60
62
61
## Useful Pages
63
62
64
-
The ones worth keeping in your muscle memory:
65
-
66
-
-`/demos/index`
67
-
-`/demos/bubbles`
68
-
-`/demos/dynamic-layout`
69
-
-`/demos/editorial-engine`
70
-
-`/demos/justification-comparison`
71
-
-`/demos/markdown-chat`
72
-
-`/demos/rich-note`
73
-
-`/accuracy`
74
-
-`/benchmark`
75
-
-`/corpus`
63
+
-`/demos/index` — index of the public demos
64
+
-`/accuracy` — browser sweep and per-line diagnostics
65
+
-`/benchmark` — performance comparisons
66
+
-`/corpus` — long-form corpus diagnostics
76
67
77
-
## Current Sources Of Truth
68
+
## Current Dashboards And Snapshots
78
69
79
70
Use these for the current checked-in picture:
80
71
@@ -84,38 +75,16 @@ Use these for the current checked-in picture:
84
75
-[benchmarks/chrome.json](benchmarks/chrome.json), [benchmarks/safari.json](benchmarks/safari.json) — raw benchmark snapshots
85
76
-[corpora/dashboard.json](corpora/dashboard.json) — machine-readable corpus dashboard
86
77
-[corpora/chrome-step10.json](corpora/chrome-step10.json), [corpora/safari-step10.json](corpora/safari-step10.json) — checked-in browser `step=10` corpus sweep snapshots
87
-
-[PLATFORM_BUGS.md](PLATFORM_BUGS.md) — current browser/OS issue and workaround ledger
88
-
-[RESEARCH.md](RESEARCH.md)— the exploration log and the durable conclusions behind the current model
78
+
79
+
[PLATFORM_BUGS.md](PLATFORM_BUGS.md)is the current browser/OS issue and workaround ledger. [RESEARCH.md](RESEARCH.md) keeps durable findings and rejected approaches; it is not a source for current counts or tracker status.
89
80
90
81
## Deep Profiling
91
82
92
-
For one-off performance and memory work, start in a real browser.
93
-
94
-
Preferred loop:
95
-
96
-
1. Start the normal page server with `bun start`.
97
-
2. Launch an isolated Chrome with:
98
-
-`--remote-debugging-port=9222`
99
-
- a throwaway `--user-data-dir`
100
-
- background throttling disabled if the run is interactive
101
-
3. Connect over Chrome DevTools or CDP.
102
-
4. Use a tiny dedicated repro page before profiling the full benchmark page.
103
-
5. Ask the questions in this order:
104
-
- Is this a benchmark regression?
105
-
- Where is the CPU time going?
106
-
- Is this allocation churn?
107
-
- Is anything still retained after GC?
108
-
109
-
Use the right tool for each question:
110
-
111
-
- Throughput / regression:
112
-
-[pages/benchmark.ts](pages/benchmark.ts)
113
-
- or a tiny dedicated stress page when the issue is narrower than the whole benchmark harness
114
-
- CPU hotspots:
115
-
- Chrome CPU profiler or performance trace
116
-
- Allocation churn:
117
-
- Chrome heap sampling during the workload
118
-
- Retained memory:
119
-
- force GC, take a before heapsnapshot, run the workload, force GC again, take an after heapsnapshot, and diff what survives
120
-
121
-
A pure Bun/Node microbenchmark is still useful for cheap hypothesis checks, but it is not the final answer when the question is browser behavior.
83
+
For one-off performance and memory work, start with `bun start` and an isolated, foreground Chrome using a throwaway profile. Reproduce the issue on [pages/benchmark.ts](pages/benchmark.ts), or on a smaller dedicated page when the benchmark is too broad.
84
+
85
+
- Use the benchmark for throughput regressions.
86
+
- Use a CPU profile or performance trace for hotspots.
87
+
- Use heap sampling for allocation churn.
88
+
- Diff forced-GC heap snapshots for retained memory.
89
+
90
+
Bun/Node microbenchmarks are useful for cheap hypotheses, but browser behavior needs browser evidence.
0 commit comments