Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

Optimize removeChild #1093

Closed HaimZik closed 2 years ago

HaimZik commented 2 years ago

Prevent RemoveChild needlessly doing indexOf. This was causing O(n log n) behavior in the case of removing all children. Fix short black screen at the end of Starling demo benchmark for large amount of Images.

PrimaryFeather commented 2 years ago

Thanks a lot, a very useful optimization! 👍