YoYoGames/GameMaker-HTML5

yyNineSliceData performance issues

Closed this issue · 1 comments

If a nine-sliced sprite is used multiple (N) times on a sprite asset layer (with different width,height dimensions), each element will cause the sprite's yyNineSliceCacheData to be re-generated, causing performance issues (N regenerations each frame).

This can be worked around by manually duplicating the asset element's sprites as well as their nineslice data on Room Start, and delete on Room End. However the issue is obscure and the workaround tedious.

After some more tests with GML caching logic, I don't think DrawComplex with repeat nineslice data can be improved by individual nineslice data caching. I'll use cached sprite textures instead.