Address Feedback

This commit is contained in:
sunshineinabox 2023-07-10 21:04:55 -07:00
parent 18bdec368e
commit 6b269887f2
2 changed files with 4 additions and 4 deletions

View file

@ -57,7 +57,7 @@ namespace ARMeilleure.Translation
private Thread[] _backgroundTranslationThreads;
private volatile int _threadCount;
private static int physicalCoreCount;
private static int _physicalCoreCount;
// FIXME: Remove this once the init logic of the emulator will be redone.
@ -121,13 +121,13 @@ namespace ARMeilleure.Translation
_ptc.Disable();
physicalCoreCount = SystemInfo.GetPhysicalCoreCount();
_physicalCoreCount = SystemInfo.GetPhysicalCoreCount();
// Simple heuristic, should be user configurable in future. (1 for 4 core/ht or less, 2 for 6 core + ht
// etc). All threads are normal priority except from the last, which just fills as much of the last core
// as the os lets it with a low priority. If we only have one rejit thread, it should be normal priority
// as highCq code is performance critical.
int unboundedThreadCount = Math.Max(1, (physicalCoreCount - 6) / 3);
int unboundedThreadCount = Math.Max(1, (_physicalCoreCount - 6) / 3);
int threadCount = Math.Min(4, unboundedThreadCount);
Thread[] backgroundTranslationThreads = new Thread[threadCount];

View file

@ -118,7 +118,7 @@ namespace Ryujinx.Common.SystemInfo
Arguments = "-n hw.physicalcpu",
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
CreateNoWindow = true,
}
};