GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

Optimize event-function context creation

Open D8H opened this issue 4 months ago • 0 comments

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:

image image

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.

image image

D8H avatar Aug 09 '25 16:08 D8H