Browsed by
Month: July 2018

Reflect is just too slow

Reflect is just too slow

After reducing collision objects in previous article and optimize memory usage, I think it is time to do some pressure test. So the entire scene is frozen when spawning 1440 bullets. The profile info looks like: The profile shows that every access operation rely on ‘Type.getClassName’ function, because Entity object uses [Class => value] Map to store components in traditional ECS framework. But Reflect is very slow, it takes 18% execution time just for adding components to Entity. There is second part: Because Bullet Entity use…

Read More Read More