Configured the garbage collector for lower spikes (#88)

Did you know that the garbage collector's default settings are designed for single-threaded applications and quick start-up times? We don't care about either of these.

Configured:
- Concurrent GC (default is true) (set for clarity)
- RetainVM: segments that should be deleted are put on a standby list for future use (default is false)
- QuickJit: enabling quick JIT decreases startup time but can produce code with degraded performance characteristics; for example, the code may use more stack space, allocate more memory, and run slower. (default is true) (disabled)
- ReadyToRun: configures whether the .NET runtime uses pre-compiled code for images with available ReadyToRun data; disabling this option forces the runtime to JIT-compile framework code. (default is true) (set to false, we dont publish with this option anyway)
- TieredPGO: this setting enables dynamic (tiered) profile-guided optimization (PGO) in .NET 6 and later versions. If quick JIT is disabled but tiered compilation is enabled, only pre-compiled code participates in tiered compilation. If a method is not pre-compiled with ReadyToRun, the JIT behavior is the same as if tiered compilation were disabled.

Features:
- Set ``GCLatencyMode.Interactive`` when in-menu and emulator is paused, otherwise uses ``GCLatencyMode.LowLatency``.
- Added a new UI option in the Settings > CPU menu to toggle ``GCLatencyMode.LowLatency`` during guest runtime.

![image](/attachments/84ffc6c6-d92c-4ec5-8a95-9d72dc6f1b04)

Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/88
This commit is contained in:
Max
2026-05-22 23:12:19 +00:00
committed by sh0inx
parent e477ec7149
commit 4631e0a9e1
12 changed files with 127 additions and 4 deletions

View File

@@ -200,6 +200,31 @@
"zh_TW": "使用 Hypervisor"
}
},
{
"ID": "SettingsTabSystemGCLowLatency",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Use Low-latency Garbage Collector",
"es_ES": "Usa recolección de basura de baja latencia",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "MenuBarFile",
"Translations": {
@@ -16550,6 +16575,31 @@
"zh_TW": "變更客體記憶體的映射和存取方式。這會極大地影響模擬 CPU 效能。\n\n如果不確定請設定為主體略過檢查模式。"
}
},
{
"ID": "GCLowLatencyTooltip",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Sets the garbage collector for the CLR to low-latency mode.\n\nThis may decrease stuttering at the cost of performance.\n\nLeave OFF if unsure.",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "MemoryManagerSoftwareTooltip",
"Translations": {