Repository navigation
fix: allow sourcemap serialization to exceed capacity estimates - #473
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Merging this PR will improve performance by 2.88%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | lookup_token[real_small] |
1.3 µs | 1.3 µs | +4.29% |
| ⚡ | lookup_token[real_medium] |
1.8 µs | 1.7 µs | +3.19% |
| ⚡ | lookup_table[real_small] |
2.6 µs | 2.6 µs | +2.09% |
| ⚡ | lookup_table[real_medium] |
2.8 µs | 2.7 µs | +1.98% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/serialization-capacity (8ba13c5) with main (3131685)
Footnotes
-
7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Valid VLQ mappings can need up to 35 bytes per token, exceeding the 12-byte estimate and triggering a debug assertion after successful serialization. Remove that assertion; existing capacity checks still reserve space before unsafe writes.
Count line breaks once across chunks to avoid overallocating, and strengthen round-trip coverage with large positive and negative deltas.