From b7233d7e556c73348f445058bc89bc9d2d55063a Mon Sep 17 00:00:00 2001 From: Ven0m0 <82972344+Ven0m0@users.noreply.github.com> Date: Wed, 4 Feb 2026 16:38:52 +0000 Subject: [PATCH] perf: Add SetBatchLines -1 to Citra_3DS_Manager.ahk Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- Other/Citra_mods/Citra_3DS_Manager.ahk | 1 + Other/Citra_mods/PERFORMANCE_RATIONALE.md | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 Other/Citra_mods/PERFORMANCE_RATIONALE.md diff --git a/Other/Citra_mods/Citra_3DS_Manager.ahk b/Other/Citra_mods/Citra_3DS_Manager.ahk index a21d807..db5a252 100644 --- a/Other/Citra_mods/Citra_3DS_Manager.ahk +++ b/Other/Citra_mods/Citra_3DS_Manager.ahk @@ -1,6 +1,7 @@ #SingleInstance Force #Warn #NoEnv +SetBatchLines, -1 SetWorkingDir %A_ScriptDir% ListLines Off DetectHiddenWindows, Off diff --git a/Other/Citra_mods/PERFORMANCE_RATIONALE.md b/Other/Citra_mods/PERFORMANCE_RATIONALE.md new file mode 100644 index 0000000..a7ad0e2 --- /dev/null +++ b/Other/Citra_mods/PERFORMANCE_RATIONALE.md @@ -0,0 +1,12 @@ +# Performance Optimization: Disable Batch Lines + +**Change:** Added `SetBatchLines, -1` to the auto-execute section of `Citra_3DS_Manager.ahk`. + +**Why:** By default, AutoHotkey scripts sleep for 10ms after every 10ms of execution to avoid monopolizing the CPU. This behavior, while friendly to single-core systems of the past, introduces significant latency in loops and string processing tasks. + +**Impact:** `SetBatchLines, -1` disables this sleep behavior, allowing the script to run as fast as possible. This is particularly effective for: +- `Loop, Read` (file reading) +- `Loop, Files` (file scanning) +- String manipulation (RegEx, parsing) + +**Measurement Note:** Due to the current Linux environment lacking a Windows execution compatibility layer (Wine) for AutoHotkey, a direct runtime benchmark could not be performed. However, this is a standard and well-documented optimization for AHK v1 scripts, with expected speedups of 100% or more in tight loops.