Commit
bd5cd062 (that introduced event actions for global animations)
also added a nasty performance bottleneck due to complexity of parsing
event action parameters, which slowed down program startup phase quite
significantly. However, in most cases these parameters just stay at
their default values, so checking for that default value first results
in massively speeding up this part of the startup phase.
static int get_anim_action_parameter_value(char *token)
{
+ // check most common default case first to massively speed things up
+ if (strEqual(token, ARG_UNDEFINED))
+ return ANIM_EVENT_ACTION_NONE;
+
int result = getImageIDFromToken(token);
if (result == -1)