Blender Git Commit Log
Git Commits -> Revision 3abb8e8
Revision 3abb8e8 by Benoit Bolsee (master) May 3, 2009, 22:29 (GMT) |
BGE performance: second round of scenegraph improvement. Use dynamic linked list to handle scenegraph rather than dumb scan of the whole tree. The performance improvement depends on the fraction of moving objects. If most objects are static, the speed up is considerable. The following table compares the time spent on scenegraph before and after this commit on a scene with 10000 objects in various configuratons: Scenegraph time (ms) Before After (includes culling) All objects static, 8.8 1.7 all visible but small fraction in the view frustrum All objects static, 7,5 0.01 all invisible. All objects moving, 14.1 8.4 all visible but small fraction in the view frustrum This tables shows that static and invisible objects take no CPU at all for scenegraph and culling. In the general case, this commit will speed up the scenegraph between 2x and 5x. Compared to 2.48a, it should be between 4x and 10x faster. Further speed up is possible by making the scenegraph cache-friendly. Next round of performance improvement will be on the rasterizer: use the same dynamic linked list technique for the mesh slots. |
Commit Details:
Full Hash: 3abb8e8e68c824db7cecdf2360e8e1daaff00413
SVN Revision: 20048
Parent Commit: 2aa3c93
Lines Changed: +658, -429
2 Added Paths:
/source/gameengine/SceneGraph/SG_DList.h (+147, -0) (View)
/source/gameengine/SceneGraph/SG_QList.h (+144, -0) (View)
/source/gameengine/SceneGraph/SG_QList.h (+144, -0) (View)
12 Modified Paths:
/projectfiles_vc9/gameengine/scenegraph/SG_SceneGraph.vcproj (+9, -0) (Diff)
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_Scene.cpp (+34, -6) (Diff)
/source/gameengine/Ketsji/KX_Scene.h (+7, -0) (Diff)
/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp (+3, -1) (Diff)
/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp (+6, -4) (Diff)
/source/gameengine/SceneGraph/SG_IObject.cpp (+9, -83) (Diff)
/source/gameengine/SceneGraph/SG_IObject.h (+102, -27) (Diff)
/source/gameengine/SceneGraph/SG_Node.cpp (+4, -59) (Diff)
/source/gameengine/SceneGraph/SG_Node.h (+77, -36) (Diff)
/source/gameengine/SceneGraph/SG_Spatial.cpp (+6, -141) (Diff)
/source/gameengine/SceneGraph/SG_Spatial.h (+108, -70) (Diff)
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_Scene.cpp (+34, -6) (Diff)
/source/gameengine/Ketsji/KX_Scene.h (+7, -0) (Diff)
/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp (+3, -1) (Diff)
/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp (+6, -4) (Diff)
/source/gameengine/SceneGraph/SG_IObject.cpp (+9, -83) (Diff)
/source/gameengine/SceneGraph/SG_IObject.h (+102, -27) (Diff)
/source/gameengine/SceneGraph/SG_Node.cpp (+4, -59) (Diff)
/source/gameengine/SceneGraph/SG_Node.h (+77, -36) (Diff)
/source/gameengine/SceneGraph/SG_Spatial.cpp (+6, -141) (Diff)
/source/gameengine/SceneGraph/SG_Spatial.h (+108, -70) (Diff)