diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 23:36:49 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 23:52:13 -0300 |
| commit | 8474b3a7c16cdac242f362144d100931f149ad6f (patch) | |
| tree | cc095d6930015f30a3c4ac697047eb78c98652ad /docs/typ | |
| parent | b40ce1fcea232b99f28462c54cffc9fdd78abbad (diff) | |
| download | pardes-8474b3a7c16cdac242f362144d100931f149ad6f.tar.gz pardes-8474b3a7c16cdac242f362144d100931f149ad6f.zip | |
Text.setRanges counts each range's rows on from the last one's, one pass over the text to the last range where a count from the top for each was a pass a range (walk UI, line E, for item 3's live s: "every key in a prompt draws its live effect in the same frame"): RUN (pardes-perf --search, ReleaseFast, a 1.08 MB file, `%s` then a pattern that finds 1024 ranges near the top): 442-451 million instructions, 25-27 ms a key and its frame; THE CAUSE: Text.zig setRanges put each range's two ends with modal.positionAt, whose row is lineAtOffset's count of every newline from the text's start (1024 ranges, two ends each, a pass each); THE FIX: the ranges are sorted and merged by then, so a Walked counter takes each end's row on from the last (positionAt's answer, from the top again for an end before the last); now 30-38 million, 1.6-2.3 ms, the no-match key (`qq`, a pass over the text) 50.8 million, 2.2-2.4 ms, `/` 1.5-2.1 million (9.7 million its first key); TEST FIRST: Text.zig "setRanges puts each range's ends where positionAt says, counting rows on from the last"; core-test 1019/1186 (167 skipped), shell-test 1233/1236, pane-test 182/184, behaviour-test 274/277, process-test A's six (the failures A's, as on item 1)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/typ')
0 files changed, 0 insertions, 0 deletions
