CensoredASM

CensoredASM

422k Downloads

updateAnimations rewrite is slow

embeddedt opened this issue ยท 0 comments

commented

It seems that updateAnimations takes up quite a bit of CPU time now. Here is a profiler screenshot from my modpack:

image

Since most of the time is reported as "self time" it's probably caused by the loop bodies running many times.
Is it possible to iterate over listAnimatedSprites instead here? We shouldn't ever care about calling updateAnimation on non-animated sprites.

for (TextureAtlasSprite sprite : this.mapUploadedSprites.values()) {