summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 21:01:04 -0300
committerGabriel Schneider <[email protected]>2026-11-21 21:34:04 -0300
commitb7e843256982f5a22954d103bb40264daf2bb758 (patch)
tree91b5e4398d401bcaf057ca15094f584a71ae38df /core
parent71a68eac9d4bce7deb19236a9cc8338b1a37caa1 (diff)
downloadpardes-b7e843256982f5a22954d103bb40264daf2bb758.tar.gz
pardes-b7e843256982f5a22954d103bb40264daf2bb758.zip
layers: a terminal's output pays less for the layers with `Changes` off: `jj.paint` is called never inlined from `body_layer.renderBody` (inlined, it grew renderBody's own frame, which every body of every frame pays, a terminal's too, though no terminal reaches the call); measured, a variant at a time, the gate's perfops in its own layout (`perf/tops.sh`: all 121 counts of the candidate's pardes-perf against tree3's): `terminal on all` on item 0 +0.083% (merge50 before round 3: +0.026%; round 3 alone: +0.259%), with `Changes`'s jj session behind a pointer +0.082% (not kept), with the paint call gone +0.050%, with no `Changes` builtin as well +0.050% (the builtin costs nothing), with the call kept but never inlined +0.050% (this change), with no `Surface.lanes` as well +0.047% (not kept: 3,000 instructions an operation); the rest over merge50, about 25,000 instructions an operation, is not found yet
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core')
-rw-r--r--core/body_layer.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/body_layer.zig b/core/body_layer.zig
index 28b86f78..78b8e0b9 100644
--- a/core/body_layer.zig
+++ b/core/body_layer.zig
@@ -338,7 +338,9 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
// File layout is independent of whether its producer requests colors.
if (pane.file) |*f| {
drawGutter(p, s, pane, r, tx, tw, body_h, active);
- if (pane.layers.lanes > 0) @import("jj.zig").paint(p, s, pane, r, tx, tw, body_h);
+ // Never inlined: in renderBody's own frame it cost every body a
+ // frame (a terminal's output about 33,000 instructions a pump).
+ if (pane.layers.lanes > 0) @call(.never_inline, @import("jj.zig").paint, .{ p, s, pane, r, tx, tw, body_h });
panes.Query.paintMark(p, s, pane, r, body_h);
if (pane.colorAlgo() != .none)
panes.File.recolorSyntax(p, s, pane, f, r, tx, tw, body_h);