[Orxonox-commit 1666] r6384 - code/branches/presentation2/src/libraries/core

rgrieder at orxonox.net rgrieder at orxonox.net
Mon Dec 21 12:30:03 CET 2009


Author: rgrieder
Date: 2009-12-21 12:30:02 +0100 (Mon, 21 Dec 2009)
New Revision: 6384

Modified:
   code/branches/presentation2/src/libraries/core/Core.cc
Log:
Playing Orxonox on a specific core makes it faster on Windows.
The problem is in fact that the timer NEEDS to be queried on the same core in order to avoid offsets. But if the querying thread is on the wrong core, the thread has to be rescheduled and that takes time. Considering that this happens quite often (Windows tries to play it on both cores), the performance penalty is serious (9% in may case).
I imagine that this issue is even more serious on a quad core.

Modified: code/branches/presentation2/src/libraries/core/Core.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/Core.cc	2009-12-19 21:14:08 UTC (rev 6383)
+++ code/branches/presentation2/src/libraries/core/Core.cc	2009-12-21 11:30:02 UTC (rev 6384)
@@ -78,7 +78,7 @@
 
     SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file");
 #ifdef ORXONOX_PLATFORM_WINDOWS
-    SetCommandLineArgument(limitToCPU, 0).information("Limits the program to one cpu/core (1, 2, 3, etc.). 0 turns it off (default)");
+    SetCommandLineArgument(limitToCPU, 1).information("Limits the program to one CPU/core (1, 2, 3, etc.). Default is the first core (faster than off)");
 #endif
 
     Core::Core(const std::string& cmdLine)




More information about the Orxonox-commit mailing list