summaryrefslogtreecommitdiff
path: root/core/body_layer.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 23:05:03 -0300
committerGabriel Schneider <[email protected]>2026-11-24 23:05:03 -0300
commitd2984ed50f72468b1c7304f4b354a2a5f242e2ca (patch)
treef8bdfb2aa0f4b7f3bbcd8f05feee19b2024451ff /core/body_layer.zig
parent5d091b37b4641c274900d4d02b7f1d61b5a9301f (diff)
downloadpardes-d2984ed50f72468b1c7304f4b354a2a5f242e2ca.tar.gz
pardes-d2984ed50f72468b1c7304f4b354a2a5f242e2ca.zip
perf: pardes-perf --walkf measures line F's hot paths in a 2,000-line file, each a step and its frame (a Down in the registers' level unrolled, a frame with `]`'s targets painted against one at rest, a Down in the themes picker), and the painted targets look for the spec's six alone (`f p T c g d`, pick-ui SPEC §4.4: the tree objects function, test, comment; a type's, an argument's, an entry's and an element's queries no longer run on the frame): a frame with `]` painted 18.1M instructions in Debug before, 11.7M after, against 1.17M at rest (walk UI line F, the brief's measures; the ReleaseFast counts in the report)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/body_layer.zig')
-rw-r--r--core/body_layer.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/body_layer.zig b/core/body_layer.zig
index 13c24f97..3736e467 100644
--- a/core/body_layer.zig
+++ b/core/body_layer.zig
@@ -558,8 +558,8 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
/// Painted targets (SPEC §4.4), while a motion root's level shows in this
/// body's tag: each of its keys at the line it would go to, in the gutter
/// (`g e t b .` for `g`; for `]` the next and for `[` the previous
-/// function, paragraph, test, comment, change, diagnostic, type, argument:
-/// `f p T c g d t a`); browsing `m a` or `m i` unrolled, the brackets'
+/// function, paragraph, test, comment, change and diagnostic: `f p T c g
+/// d`, the spec's, each tree object a query of the rows shown); browsing `m a` or `m i` unrolled, the brackets'
/// region around the caret tinted. Only the rows shown are looked at: a
/// target off them is not painted (the tag's arrows, SPEC §15, are not
/// built). At rest it costs one test of the view's tag state.
@@ -778,7 +778,7 @@ fn targetLine(p: *Pardes, pane: *Pane, f: *panes.File.State, role: modal.Normal.
if (forward) return if (a < hits.len) lineOf(f, hits[a].start) else null;
return if (a > 0) lineOf(f, hits[a - 1].start) else null;
},
- inline .goto_function, .goto_class, .goto_parameter, .goto_comment, .goto_test, .goto_entry, .goto_xml_element => |r| {
+ inline .goto_function, .goto_comment, .goto_test => |r| {
// The tree as the motion reads it, made once a revision; with
// the Changes layer's lines in the buffer its offsets are not the
// buffer's: not painted then.