GDevelop
GDevelop copied to clipboard
Optimize event-function context creation
I observed 2 cases when the optimization is noticeable. It also probably reduces memory fragmentation which may improve performance in heavy games.
Free functions without object parameters
4,000,000 calls to a free function with a JS event only accessing parameters is 3 times faster:
Life-cycle functions
10,000 objects with a behavior where the doStepPreEvents contains a JS event that only accesses the object and behavior is a bit faster.