Easel Entity performance impact
eerussianguy opened this issue · 1 comments
Obviously spark profiles are to be taken with a grain of salt, but calling move and reapplyPosition every tick causes a lot of collision overhead that's not necessary.
That is the simplest gravity implementation I could do. Comparing that to a similar entity like armor stand that calls move() and also a million other things every tick, I think this is fine. If you have a better suggestion, I am happy to change it though. All I want in that part is for the entity to obey gravity in a simple way.
I measured average running times of those two lines, it takes ~15 μs for move and ~1.8 μs for reapplyPosition on my pc. I think it should be fine as is unless you have hundreds of easels in the same region.