blender/source/gameengine/Expressions
Benoit Bolsee 386122ada6 BGE performance, 4th round: logic
This commit extends the technique of dynamic linked list to the logic
system to eliminate as much as possible temporaries, map lookup or 
full scan. The logic engine is now free of memory allocation, which is
an important stability factor. 

The overhead of the logic system is reduced by a factor between 3 and 6
depending on the logic setup. This is the speed-up you can expect on 
a logic setup using simple bricks. Heavy bricks like python controllers
and ray sensors will still take about the same time to execute so the
speed up will be less important.

The core of the logic engine has been much reworked but the functionality
is still the same except for one thing: the priority system on the 
execution of controllers. The exact same remark applies to actuators but
I'll explain for controllers only:

Previously, it was possible, with the "executePriority" attribute to set
a controller to run before any other controllers in the game. Other than
that, the sequential execution of controllers, as defined in Blender was
guaranteed by default.

With the new system, the sequential execution of controllers is still 
guaranteed but only within the controllers of one object. the user can
no longer set a controller to run before any other controllers in the
game. The "executePriority" attribute controls the execution of controllers
within one object. The priority is a small number starting from 0 for the
first controller and incrementing for each controller.

If this missing feature is a must, a special method can be implemented
to set a controller to run before all other controllers.

Other improvements:
- Systematic use of reference in parameter passing to avoid unnecessary data copy
- Use pre increment in iterator instead of post increment to avoid temporary allocation
- Use const char* instead of STR_String whenever possible to avoid temporary allocation
- Fix reference counting bugs (memory leak)
- Fix a crash in certain cases of state switching and object deletion
- Minor speed up in property sensor
- Removal of objects during the game is a lot faster
2009-05-10 20:53:58 +00:00
..
BoolValue.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
BoolValue.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
CMakeLists.txt BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
ConstExpr.cpp use long long rather then int for storing game logic properties. 2009-04-12 06:41:01 +00:00
ConstExpr.h use long long rather then int for storing game logic properties. 2009-04-12 06:41:01 +00:00
EmptyValue.cpp BGE C++ API 2009-04-22 14:42:00 +00:00
EmptyValue.h use long long rather then int for storing game logic properties. 2009-04-12 06:41:01 +00:00
ErrorValue.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
ErrorValue.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
EXP_C-Api.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
EXP_C-Api.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
Expression.cpp Various mem leaks related to CValue reference count fixed 2008-03-01 19:46:50 +00:00
Expression.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
FloatValue.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
FloatValue.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
IdentifierExpr.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
IdentifierExpr.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
IfExpr.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
IfExpr.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
InputParser.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
InputParser.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
IntValue.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
IntValue.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_HashedPtr.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_HashedPtr.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_Python_dynamic.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_Python_static.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_Python.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
ListValue.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
ListValue.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
Makefile BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
Operator1Expr.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
Operator1Expr.h Synchronise game engine with Tuhopuu2 tree. 2004-04-24 06:40:15 +00:00
Operator2Expr.cpp Synchronise game engine with Tuhopuu2 tree. 2004-04-24 06:40:15 +00:00
Operator2Expr.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
PyObjectPlus.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
PyObjectPlus.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
SConscript BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
StringValue.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
StringValue.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
Value.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
Value.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
VectorValue.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
VectorValue.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
VoidValue.h use long long rather then int for storing game logic properties. 2009-04-12 06:41:01 +00:00