Browse Source

set some config variables to suitable defaults for threading

David Rose 14 years ago
parent
commit
5588210e22
2 changed files with 13 additions and 13 deletions
  1. 1 1
      panda/src/display/config_display.cxx
  2. 12 12
      panda/src/pgraph/config_pgraph.cxx

+ 1 - 1
panda/src/display/config_display.cxx

@@ -86,7 +86,7 @@ ConfigVariableBool auto_flip
           "is achieved in parallel with the graphics card."));
           "is achieved in parallel with the graphics card."));
 
 
 ConfigVariableBool sync_flip
 ConfigVariableBool sync_flip
-("sync-flip", true,
+("sync-flip", false,
  PRC_DESC("Set this true to attempt to flip all windows at the same time, "
  PRC_DESC("Set this true to attempt to flip all windows at the same time, "
           "or false to flip each window as late as possible.  Setting this "
           "or false to flip each window as late as possible.  Setting this "
           "false can improve parallelization.  This is a temporary "
           "false can improve parallelization.  This is a temporary "

+ 12 - 12
panda/src/pgraph/config_pgraph.cxx

@@ -169,14 +169,13 @@ ConfigVariableBool compose_componentwise
           "are always computed by matrix."));
           "are always computed by matrix."));
 
 
 ConfigVariableBool uniquify_matrix
 ConfigVariableBool uniquify_matrix
-("uniquify-matrix", false,
+("uniquify-matrix", true,
  PRC_DESC("Set this true to look up arbitarary 4x4 transform matrices in the "
  PRC_DESC("Set this true to look up arbitarary 4x4 transform matrices in the "
           "cache, to ensure that two differently-computed transforms that "
           "cache, to ensure that two differently-computed transforms that "
-          "happen to encode the same matrix (an unlikely occurrence) will be "
-          "collapsed into a single pointer (a tiny benefit).  We're usually "
-          "better off not paying the cost of this comparison, and just "
-          "assuming that any two differently-computed transforms are "
-          "essentially different."));
+          "happen to encode the same matrix will be "
+          "collapsed into a single pointer.  Nowadays, "
+          "with the transforms stored in a hashtable, we're generally better "
+          "off with this set true."));
 
 
 ConfigVariableBool paranoid_const
 ConfigVariableBool paranoid_const
 ("paranoid-const", false,
 ("paranoid-const", false,
@@ -193,7 +192,7 @@ ConfigVariableBool auto_break_cycles
           "from time to time to prevent gradual memory bloat."));
           "from time to time to prevent gradual memory bloat."));
 
 
 ConfigVariableBool garbage_collect_states
 ConfigVariableBool garbage_collect_states
-("garbage-collect-states", false,
+("garbage-collect-states", true,
  PRC_DESC("Set this true to defer destruction of TransformState and "
  PRC_DESC("Set this true to defer destruction of TransformState and "
           "RenderState objects until the end of the frame (or whenever "
           "RenderState objects until the end of the frame (or whenever "
           "TransformState::garbage_collect() and RenderState::garbage_collect() "
           "TransformState::garbage_collect() and RenderState::garbage_collect() "
@@ -201,13 +200,14 @@ ConfigVariableBool garbage_collect_states
           "using multiple threads, because it improves parallelization."));
           "using multiple threads, because it improves parallelization."));
 
 
 ConfigVariableDouble garbage_collect_states_rate
 ConfigVariableDouble garbage_collect_states_rate
-("garbage-collect-states-rate", 0.25,
+("garbage-collect-states-rate", 1.0,
  PRC_DESC("The fraction of the total number of TransformStates "
  PRC_DESC("The fraction of the total number of TransformStates "
           "(or RenderStates, or whatever) that are processed with "
           "(or RenderStates, or whatever) that are processed with "
-          "each garbage collection step.  Setting this larger (up to "
-          "1.0) will ensure that more states are collected each frame, "
-          "limiting the wasted size of the cache, but will require more "
-          "processing time each frame."));
+          "each garbage collection step.  Setting this smaller than "
+          "1.0 will collect fewer states each frame, which may require "
+          "less processing time, but risks getting unstable cache "
+          "performance if states accumulate faster than they can be "
+          "cleaned up."));
 
 
 ConfigVariableBool transform_cache
 ConfigVariableBool transform_cache
 ("transform-cache", true,
 ("transform-cache", true,