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: TASKS.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,23 @@
2
2
3
3
Active work only. Historical completed work lives in [notes/AGENT_NOTES.md](notes/AGENT_NOTES.md) and [AGENTS.md](AGENTS.md).
4
4
5
-
-[x]**Task 42: Finalize the core boxed contract runtime**
6
-
- Remove `ISchema`, `SchemaDefinition`, `SchemaField`, and `obj[] -> obj` record construction from the active core implementation.
7
-
- Move the public authored DSL to `Schema.*` over `Schema<'T>`.
8
-
- Delete the old schema DSL instead of keeping compatibility shims.
9
-
- Retarget `Json`, `Xml`, `Yaml`, `KeyValue`, and `JsonSchema` to compile from the new boxed contract IR directly.
10
-
- Remove any `Lowering.lower` or legacy boxed-schema bridge from the runtime path.
11
-
- Update tests, benchmarks, and docs to the new surface.
12
-
- Explicitly exclude bridge internals from this task. Bridge cleanup can follow once the core runtime shape is stable.
13
-
- Completion bar: there is no old boxed DSL left in the core runtime path or public authored surface.
5
+
- Recently completed: **Task 42** landed the boxed contract runtime and `Schema<'T>` surface. Keep the historical rationale, benchmark notes, and follow-up findings in [notes/AGENT_NOTES.md](notes/AGENT_NOTES.md) and [docs/PROFILE-REPORT-ANALYSIS-INSTRUCTIONAL.md](docs/PROFILE-REPORT-ANALYSIS-INSTRUCTIONAL.md).
6
+
7
+
-[ ]**Task 50: Run a narrow post-Task-42 performance follow-up**
8
+
- Treat the current numbers as two separate problems: typed record decode overhead and handwritten parser hot loops.
9
+
- Stay disciplined: no broad runtime rewrite until a narrower experiment wins clearly on the published scenario set.
10
+
- First pass:
11
+
- generalize the typed JSON record-decode lane beyond the benchmark-only hand-written shapes
12
+
- profile string-heavy decode and serialize hotspots again after each step
13
+
- identify whether the next worthwhile work is parser scanning, string handling, unknown-field skipping, or record assembly
14
+
- Output:
15
+
- refresh the benchmark notes with before/after numbers
16
+
- either promote one proven optimization direction into production work or explicitly close the line of investigation
14
17
15
18
-[ ]**Task 49: Review and improve the new DSL for DX**
16
-
-After Task 42, review the new `Schema.*` surface for compactness, clarity, and maintainability.
19
+
-Review the new `Schema.*` surface for compactness, clarity, and maintainability after the immediate perf follow-up is settled.
17
20
- Capture improvements in `PLAN-TO-IMPROVE-DSL`.
18
-
- Do not implement that review directly in the same pass unless it is required to complete Task 42.
21
+
- Do not fold speculative API cleanup into performance work unless it materially simplifies a measured hot path.
Copy file name to clipboardExpand all lines: docs/HOW_TO_PROFILE_BENCHMARK_HOT_PATHS.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,9 @@ Artifacts land under `.artifacts/profiling/<operation>-<scenario-or-records>-<it
28
28
-`stj-deserialize`
29
29
-`newtonsoft-serialize`
30
30
-`newtonsoft-deserialize`
31
+
-`our-parser-scan-bytes`
32
+
-`utf8jsonreader-scan-bytes`
33
+
-`typed-experiment-deserialize-bytes`
31
34
32
35
## Typical workflow
33
36
@@ -51,6 +54,7 @@ Read `perf.stat.txt` for high-level counters and `perf.report.txt` for the hotte
51
54
52
55
- The profile wrapper now defaults to the `person-batch-25` scenario from the shared benchmark matrix.
53
56
- Pass a scenario name such as `telemetry-500` or `escaped-articles-20` to profile one of the standard workloads.
57
+
- The diagnostics matrix now also includes decode-focused scenarios such as `decode-strings-1000`, `decode-flat-objects-400`, and `decode-flat-objects-400-unknown-fields` when you need to isolate string handling, flat record assembly, or unknown-field skipping.
54
58
- Passing a plain integer as the third argument still uses the legacy nested-record batch with `--records <n>`.
55
59
- The wrapper sets `DOTNET_PerfMapEnabled=3` and `COMPlus_PerfMapEnabled=3` so `perf inject --jit` has the metadata it needs for managed symbol names.
56
60
- If `perf record` is blocked by local kernel permissions, the script will fail before writing `perf.report.txt`. In that case, fix local `perf` permissions first and rerun the same command.
Copy file name to clipboardExpand all lines: notes/AGENT_NOTES.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,7 +150,10 @@ This keeps compilation cost visible and avoids hidden recompilation or implicit
150
150
-`benchmarks/CodecMapper.Benchmarks/Program.fs` now forces BenchmarkDotNet onto `InProcessEmitToolchain` to avoid child-project generation entirely.
151
151
- The remaining warning during local runs is just Linux process-priority elevation failure (`Permission denied`), which does not stop benchmarks from executing.
152
152
- A manual Release runner was added in `benchmarks/CodecMapper.Benchmarks.Runner` to keep benchmark reporting moving while that tooling issue remains unresolved.
153
-
-`BenchmarkScenarios.fs` now expresses the benchmark-only typed JSON decode lane through reusable `recordN` and `list` combinators instead of one bespoke decoder loop per workload shape. Keep future `Task 42` work in that benchmark-only lane unless the production runtime decision has been made explicitly.
153
+
-`Json.fs` now ships a production typed-record decode fast path for supported JSON record shapes, backed by `JsonTypedRecordDecode.fs`.
154
+
- Focused reruns on April 2, 2026 showed the old benchmark-only typed lane no longer beating production on the checked scenarios (`small-message` and `telemetry-500`), so treat it as a comparison artifact rather than as the main forward path.
155
+
-`BenchmarkScenarios.fs` now includes decode diagnostics for escaped string arrays, flat records, and flat records with unknown fields so profiling can separate parser scanning, string handling, record assembly, and skip-path cost more cleanly.
156
+
- A first `.NET`-only escaped-string decoder experiment that replaced `StringBuilder` with a pooled `char[]` path produced mixed results and was reverted the same day: it improved the synthetic long escaped-string array diagnostic, but it did not hold up cleanly on the more realistic `escaped-articles-20` workload. Treat string decode as still open, but prefer narrower experiments over broad decoder rewrites.
154
157
- Keep the manual Release runner for fast local snapshots and README updates; use BenchmarkDotNet when you specifically want richer statistical output.
0 commit comments