mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-13 06:09:11 +00:00
Address Feedback
This commit is contained in:
parent
18bdec368e
commit
6b269887f2
2 changed files with 4 additions and 4 deletions
|
@ -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];
|
||||
|
|
|
@ -118,7 +118,7 @@ namespace Ryujinx.Common.SystemInfo
|
|||
Arguments = "-n hw.physicalcpu",
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
CreateNoWindow = true
|
||||
CreateNoWindow = true,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue