Files
gridcraft/crates/core
c2aba7a3f4 perf: win back formula-entry and XLSX-save time lost since 23829d8c (#2654)
Measured with crates/engine/examples/bench.rs (perf/xtask-bench), 100k rows, M2 Pro:
enter.formulas 465 -> 420 ms (23829d8c: 375), xlsx.save 540 -> 488 ms (466).

- number_to_text: the round-up-to-1E+15 check (f29ac7d9e) formatted every number with
  exact {:.14e} and parsed it back; formula printing calls it once per literal. Run it
  only for magnitudes that can round up (>= 9.9999999999999e14). Same output; boundary
  tests added.
- Expr clone/map, xlsx prefix_params: a binary node whose left operand is not a chain
  no longer allocates a spine Vec (2aeb21d4d); map rewrites the operands in their boxes.
  Expr::walk reserves room for a typical formula up front.
- grow_autofilter checks the sheet has an AutoFilter before looking up the cell.
- retained_bytes_against looks up the newer band's row once per row, not per cell.
- The journal measures an entry's JSON size with a counting writer instead of building
  the text (a big paste's params are MBs).

The rest of the enter.formulas gap and all of edit.fanout's (~+12%) is Undo's byte
budget (72db972de, #1227): sizing each snapshot and freeing evicted ones, an intended
cost of bounded memory.

Co-authored-by: nihilist-narwhal <240798405+nihilist-narwhal@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:57:27 +01:00
..