From f8bbf1040abd7c52a2c7a547b3dbe365a4f00560 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 13 May 2026 02:20:10 +0000 Subject: [PATCH 1/2] Initial plan From d95ad23403a95e4c20876c0b9cb82709d294b7bf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 13 May 2026 02:54:02 +0000 Subject: [PATCH 2/2] perf: refresh baseline.json from Ubuntu CI runner (post scroll-perf optimizations) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run full BenchmarkDotNet suite (--job short) on Ubuntu 24.04.4 / AMD EPYC 9V74 / .NET 10.0.5. Previous baseline was measured on an Apple M4 Max and predated the five scroll-perf optimizations from PR #77. Changes: - benchmarks/baseline.json: update all five categories (VisualLineBuild, Scrolling, DocumentAccess, EndToEndScroll) and add the missing CaretMovement category (Caret_Down_1K, Caret_Right_1K, Caret_CtrlHomeEnd_1K). - benchmarks/compare-baseline.sh: update the five hardcoded VisualLineBuild thresholds to match the new baseline values (5.8/35.4/6.1/6.4/6.2 us). compare-baseline.sh smoke-test passes: all ratios 1.00x–1.07x vs the new baseline. Agent-Logs-Url: https://github.com/gui-cs/Editor/sessions/d28a09a7-7034-489f-9eee-f51726fd1ea6 Co-authored-by: tig <585482+tig@users.noreply.github.com> --- benchmarks/baseline.json | 57 +++++++++++++++++++++------------- benchmarks/compare-baseline.sh | 10 +++--- 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/benchmarks/baseline.json b/benchmarks/baseline.json index 2b03b75d..d089f450 100644 --- a/benchmarks/baseline.json +++ b/benchmarks/baseline.json @@ -1,62 +1,77 @@ { - "description": "Baseline benchmark results. Updated by running: dotnet run --project benchmarks/Terminal.Gui.Editor.Benchmarks -c Release -- --filter '*VisualLineBuild*' --exporters json", - "date": "2026-05-11", - "environment": "Apple M4 Max, .NET 10.0.5, Arm64 RyuJIT", + "description": "Baseline benchmark results. Updated by running: dotnet run --project benchmarks/Terminal.Gui.Editor.Benchmarks -c Release -- --job short --exporters json --artifacts BenchmarkDotNet.Artifacts", + "date": "2026-05-13", + "environment": "Ubuntu 24.04.4 LTS, AMD EPYC 9V74, .NET 10.0.5, X64 RyuJIT AVX2", "results": { "BuildLine_Short": { - "mean_us": 2.6, - "allocated_kb": 11.64, + "mean_us": 5.8, + "allocated_kb": 11.54, "description": "Short ASCII (~40 chars)" }, "BuildLine_Long": { - "mean_us": 15.7, - "allocated_kb": 71.98, + "mean_us": 35.4, + "allocated_kb": 71.88, "description": "Long ASCII (~200 chars)" }, "BuildLine_Tabs": { - "mean_us": 3.0, - "allocated_kb": 13.13, + "mean_us": 6.1, + "allocated_kb": 12.94, "description": "Tabbed line (4 tabs + code)" }, "BuildLine_Emoji": { - "mean_us": 2.7, + "mean_us": 6.4, "allocated_kb": 10.36, "description": "Emoji / ZWJ clusters" }, "BuildLine_Mixed": { - "mean_us": 2.6, + "mean_us": 6.2, "allocated_kb": 10.45, "description": "Mixed: tabs + CJK + emoji" }, "BuildViewport_Top_10K_24": { - "mean_us": 86, - "allocated_kb": 394, + "mean_us": 205, + "allocated_kb": 391, "description": "Viewport at top (10K lines, 24 rows)" }, "FullScroll_1K_24": { - "mean_us": 4076, - "allocated_kb": 18159, + "mean_us": 10224, + "allocated_kb": 18024, "description": "Full scroll 1K lines (24-row viewport)" }, "DocLookup_Sequential_100K": { - "mean_ns": 326, + "mean_ns": 754, "allocated_bytes": 0, "description": "GetLineByNumber × 50 sequential (100K lines)" }, "DocLookup_Random_100K": { - "mean_ns": 825, + "mean_ns": 2578, "allocated_bytes": 304, "description": "GetLineByNumber × 50 random (100K lines)" }, "E2E_ArrowDown_500": { - "mean_ms": 752, - "allocated_mb": 2983, + "mean_ms": 1983, + "allocated_mb": 2631, "description": "Arrow ↓ to bottom (500 lines)" }, "E2E_PageDown_5K": { - "mean_ms": 353, - "allocated_mb": 1387, + "mean_ms": 1223, + "allocated_mb": 1367, "description": "PageDown to bottom (5K lines)" + }, + "Caret_Down_1K": { + "mean_ms": 3475, + "allocated_mb": 4712, + "description": "Caret ↓ with scroll counting (1K lines)" + }, + "Caret_Right_1K": { + "mean_ms": 164, + "allocated_mb": 222, + "description": "Caret → horizontal scroll (1K lines)" + }, + "Caret_CtrlHomeEnd_1K": { + "mean_ms": 373, + "allocated_mb": 489, + "description": "Ctrl+Home/End oscillation × 100 (1K lines)" } } } diff --git a/benchmarks/compare-baseline.sh b/benchmarks/compare-baseline.sh index 804ca1ed..33b59570 100755 --- a/benchmarks/compare-baseline.sh +++ b/benchmarks/compare-baseline.sh @@ -108,11 +108,11 @@ print(data['results'].get('$key', {}).get('description', '$key')) echo "| $desc | ${baseline_val} ${unit} | ${current} ${unit} | ${ratio}x | $status |" } -compare_benchmark "BuildLine_Short" "2.6" "us" -compare_benchmark "BuildLine_Long" "15.7" "us" -compare_benchmark "BuildLine_Tabs" "3.0" "us" -compare_benchmark "BuildLine_Emoji" "2.7" "us" -compare_benchmark "BuildLine_Mixed" "2.6" "us" +compare_benchmark "BuildLine_Short" "5.8" "us" +compare_benchmark "BuildLine_Long" "35.4" "us" +compare_benchmark "BuildLine_Tabs" "6.1" "us" +compare_benchmark "BuildLine_Emoji" "6.4" "us" +compare_benchmark "BuildLine_Mixed" "6.2" "us" echo ""