We have some code that makes use of the thread pool. It detects how many threads have been spawned and issues one job for each thread to maximise parallelism. I was doing some profiling on Xbox One and found out that there are 6 pool threads (which makes sense since it has 7 cores available), but they are affinitised to run on cores 3, 4, 5 and 6. This causes our code to issue 6 evenly sized jobs which are then run on only 4 cores, which is quite inefficient, as you can imagine.
It seems like the intention is to only spawn 4 pool threads, but it ends up spawning 6 by accident. The code that determines how many threads to spawn is in FGenericPlatformMisc::NumberOfWorkerThreadsToSpawn. It limits the number of pool threads to 4 if IsRunningGame() returns true, but this actually returns false on XboxOne (and most likely PS4 as well, although I haven’t tested it).
The problem seems to be in FGenericPlatformProperties::IsGameOnly(), which returns false and is not overridden in FXboxOnePlatformProperties. Some platforms, such as Android, have their IsGameOnly implementation return UE_GAME, which is presumably defined to 1 in game-only platforms.
This seems like it would be a good default, so I was wondering if you’d consider changing FGenericPlatformProperties::IsGameOnly to return UE_GAME to fix this problem. Does that sound reasonable? An alternative would be to override it in FXboxOnePlatformProperties and return true from there.