SpriterHaxeEngine
SpriterHaxeEngine copied to clipboard
pooling
Pooling will be a great improvement. I began to implement it (https://github.com/loudoweb/SpriterHaxeEngine/commit/5443ab41c53ac781d94f1b2eb62321a779119369)
When all objects that are instanciated many times per frames will be ready for pooling, it will be great to use typedef or something else to fallback to a specific pooling system from a framework (flixel, flambe, etc.)
That's quite a big pool (just think of all the body parts and multiply that by the number of objects) so you might want to keep an eye on the GC (https://groups.google.com/forum/m/?hl=en#!topic/haxelang/794gdCNNQdA).
Didn't think about it :/
What do you suggest?
Maybe first trying to not allocate a lot (copy() and clone() features are too much used and it results in allocating too much SpatialInfo.) Add destroy() method in every class that need it. And only then investigate for pooling?
I don't really know, testing may be in order :)