⚡ Optimize Citra Per-Game Config with Single File I/O#31
Conversation
…cements Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Pull request overview
Refactors the legacy (v1) Citra per-game config applicator to avoid repeated disk I/O by loading qt-config.ini into memory once, performing all TF-based edits in-memory, and writing the result once at the end.
Changes:
- Introduced a global
ConfigTextbuffer and updated helper functions (SetRes,SetFilter, etc.) to operate on it instead of editing the file on each call. - Added a single
FileReadbefore applying game-specific settings. - Added a single
TF_Saveafter applying settings to persist changes once.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
💡 What:
Refactored
Citra-per-game.ahkto read the configuration file into a memory variable once, perform all text replacements on this variable usingTFlibrary functions, and save the file only once at the end of the script.🎯 Why:
The previous implementation performed a file read, modification, and write operation for every single configuration setting changed. A typical game profile application involves 5-6 such operations.
This led to:
📊 Measured Improvement:
Changes:
SetRes,SetFilter, etc.) now update a globalConfigTextvariable instead of callingTF_Replaceon the file path.FileRead, ConfigText, %CitraConfigFile%at the start of the main logic.TF_Save(ConfigText, CitraConfigFile)at the end of the main logic.PR created automatically by Jules for task 75104337869570791 started by @Ven0m0