From 7d89aa764d17a5c216e6907866b407217e74e008 Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Wed, 19 Nov 2025 12:37:09 -0700 Subject: [PATCH] perf: remove some overzealous inline annotations These were actually hurting performance lol, except in the places where I added the `.always_inline` calls- for some reason if these functions aren't inlined there it really messes up the top region scrolling benchmark in vtebench and I'm not entirely certain why... --- src/terminal/page.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/terminal/page.zig b/src/terminal/page.zig index 3ccce452e..25ddbe8d2 100644 --- a/src/terminal/page.zig +++ b/src/terminal/page.zig @@ -1058,7 +1058,7 @@ pub const Page = struct { if (row.grapheme) { for (cells) |*cell| { if (cell.hasGrapheme()) - self.clearGrapheme(cell); + @call(.always_inline, clearGrapheme, .{ self, cell }); } // If we have no left/right scroll region we can be sure @@ -1074,7 +1074,7 @@ pub const Page = struct { if (row.hyperlink) { for (cells) |*cell| { if (cell.hyperlink) - self.clearHyperlink(cell); + @call(.always_inline, clearHyperlink, .{ self, cell }); } // If we have no left/right scroll region we can be sure @@ -1132,7 +1132,7 @@ pub const Page = struct { /// In order to update the hyperlink flag on the row, call /// `updateRowHyperlinkFlag` after you finish clearing any /// hyperlinks in the row. - pub inline fn clearHyperlink(self: *Page, cell: *Cell) void { + pub fn clearHyperlink(self: *Page, cell: *Cell) void { defer self.assertIntegrity(); // Get our ID @@ -1468,7 +1468,7 @@ pub const Page = struct { /// In order to update the grapheme flag on the row, call /// `updateRowGraphemeFlag` after you finish clearing any /// graphemes in the row. - pub inline fn clearGrapheme(self: *Page, cell: *Cell) void { + pub fn clearGrapheme(self: *Page, cell: *Cell) void { defer self.assertIntegrity(); if (build_options.slow_runtime_safety) assert(cell.hasGrapheme());