summaryrefslogtreecommitdiff
path: root/core/root.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 20:58:22 -0300
committerGabriel Schneider <[email protected]>2026-11-24 21:28:46 -0300
commite64bd853c33bce38f91c9103c0afceb690333585 (patch)
treef0a0981856ac59efdc93c9ef5c3ef68da0d9a320 /core/root.zig
parentbcbfd846aca7629f7fdf25f45954c5a8da2469f5 (diff)
downloadpardes-e64bd853c33bce38f91c9103c0afceb690333585.tar.gz
pardes-e64bd853c33bce38f91c9103c0afceb690333585.zip
Band: one band layer a surface, not one a pane (a fix on top of item 3, vnqmzpqs, frozen): the cost at rest of the walk UI: every frame makes many a temporary Surface (renderHeaderLayer one a header row, joinPaneTag one a tag, body_layer one a pane), each a whole Surface whose tag_layers array is default-initialised by a copy, and BAND_LAYER_BASE + MAX_PANES had added 64 layers to it: about 4 KB more copied a temporary, the +3,300 instructions an image-frame (+0.94%) and +7,000-9,000 a key or render cell, in compiler_rt memcpy under draw.renderHeaderLayer and draw.joinPaneTag (perf record of image-frame, main against moosvmpn: memcpyFast +2,650 a frame, its block loop, memcpy.zig:136-138); a view has one tag out of rest (SPEC §3.4: the keyboard's; Band.takes is 0 for every other pane), so one band layer (root.zig BAND_LAYER, the index, in place of the working name BAND_LAYER_BASE) and Band.bandLayer asks its pane id; MEASURED (pardes-perf ReleaseFast gui, per-op instructions, main e9f3712c -> moosvmpn -> this): image-frame small 351,781 -> 355,074 -> 352,716 (+0.27% on main), render small 11,351,038 -> 11,360,330 -> 11,353,581 (+0.02%), key-down small 9,932,384 -> 9,939,622 -> 9,932,840 (+0.005%), client-key-down small 1,915,270 -> 1,924,015 -> 1,921,482 (+0.32%, the rest there not traced: a profile points at the digest walk, walk.hash, which View.tag_state joined); core-test 1006/1173
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/root.zig')
-rw-r--r--core/root.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/root.zig b/core/root.zig
index b6835115..4a9b6e10 100644
--- a/core/root.zig
+++ b/core/root.zig
@@ -141,11 +141,13 @@ pub const TagKind = Layer.Kind;
/// too long for its width.
pub const MAX_TAG_ROWS = 8;
/// Panes, then columns, then the workspace bar, then each pane's notice
-/// bands: a band to a tag, however many lines it has; then each pane's
-/// rows unrolled under its tag (Band.zig).
-pub const MAX_TAG_LAYERS = BAND_LAYER_BASE + MAX_PANES;
+/// bands: a band to a tag, however many lines it has; then the rows
+/// unrolled under the one tag out of rest (Band.zig: a view has one, the
+/// keyboard's, SPEC §3.4). A frame makes many a temporary Surface, each
+/// with every layer: a layer to a pane here cost every frame 0.9%.
+pub const MAX_TAG_LAYERS = BAND_LAYER + 1;
pub const NOTICE_LAYER_BASE = MAX_PANES + MAX_COLS + 1;
-pub const BAND_LAYER_BASE = NOTICE_LAYER_BASE + MAX_PANES * Pane.Notices.max;
+pub const BAND_LAYER = NOTICE_LAYER_BASE + MAX_PANES * Pane.Notices.max;
/// Columns a session holds (each costs about 8 KB of state, a column tag
/// being most of it).
pub const MAX_COLS = 16;