summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-25 05:52:41 -0300
committerGabriel Schneider <[email protected]>2026-11-25 05:52:41 -0300
commit18043e845b39ac63dfe4416787e5cf6476ce8434 (patch)
tree0b28a690a5c671046b30498188e1567c164ccc88 /test
parentc22b57e13fec318ff4df96fb07b096ea53e31122 (diff)
downloadpardes-18043e845b39ac63dfe4416787e5cf6476ce8434.tar.gz
pardes-18043e845b39ac63dfe4416787e5cf6476ce8434.zip
syntax, body_layer, panes, normal, root, Names, Pick: `]`'s painted targets in one query pass, kept while nothing moves, and Find's first key sorting only the rows it shows (walk UI P3 item 4, POLISH 19, F's and D's reports): (a) body_layer.targetLine ran the grammar's textobject query three times a frame while `]` or `[` showed (syntax.objectNext once each for function, comment, test); NOW syntax.objectNext finds any number of objects in one pass of the query (`objects`, `out`; the motion's one-object call in normal.zig unchanged in effect) and body_layer.treeTargets asks it once for the three, keeping the lines on the pane (Pane.targets, derived: never digested or dumped) while the text's revision, the caret's byte, the lines shown and the way stay, so a frame that paints them again asks nothing; paintTargets' drawing is untouched; (b) Names.rescore sorted every hit at every call (std.sort.pdq over 50,000 paths for a first key); NOW the best `reach` hits (`max_rows`, 200: what a query pane lists; a picker's cursor gone past them sorts further, Names.reachTo from Pick.key, and C-q's keep sorts its 2,000) are kept as a heap of the best so far and sorted, the rest after them in no order (O(n log k)); (c) the picker's preview read is left on the loop: measured, a 2,000-line file's tick and frame is 2.36M instructions, 285-531 us, under a twentieth of a 60 Hz frame (a read from a slow mount would still block it: not moved, said in the report); MEASURED (pardes-perf ReleaseFast tui, the same tree before and after this change): `]` painted, tick + frame, longest 11,066,602 instr (802 us) -> 4,677,637 (368 us, the frame that asks; the cached ones about the at-rest frame's 0.89M); pick key + frame (50,000 paths, first key) 58,751,637 (4,383 us) -> 41,394,164 (2,416 us, the rest is the scorer's); pick Down + frame 1,358,803 -> 1,356,960; pick preview tick + frame 2,357,436 -> 2,365,116; TESTS: core/Names.zig "Names keeps its best `reach` hits first in a full sort's order, the rest after them, and sorts further as a cursor goes past them"; the painted targets' and the motions' own tests unchanged; root.zig names Pane.targets among the kept-out fields; core-test 1064/1234 (170 skipped), behaviour-test 280/280
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions