mirror of https://github.com/OpenMW/openmw.git
Cache CellId
ESM::Cell::getCellId() was allocating a string on every call. This caused functions dealing with cellIds to be unnecessarily expensive. For example, World::moveObject spent almost as much time comparing CellIds as it did updating Bullet's AABB after the move. OpGetDistance was by far the most expensive script instruction because it has to compare cellIds. The total cost of getCellId() relative to the frame loop was about 0.3%.pull/822/head
parent
984c455027
commit
fbee32729a
Loading…
Reference in New Issue