Speed up of LLViewerObjectList::cleanDeadObjects with a factor of 10000.
Also a little review of Dead objects in general. The old code was calling 'erase' on a large vector, once for every dead object (which are a lot, especially if you exit or teleport), causing the whole (large) vector to be copied every time. The new code only calls erase once per call (about once a second at most now), erasing 20 to 100 objects at the END of the vector. This is INCREDIBLY faster.
This commit is contained in:
@@ -376,6 +376,12 @@ std::vector<affected_object> LocalBitmap::getUsingObjects(bool seek_by_type, boo
|
||||
iter != gObjectList.mObjects.end(); iter++ )
|
||||
{
|
||||
LLViewerObject* obj = *iter;
|
||||
|
||||
if (obj->isDead())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
affected_object shell;
|
||||
shell.object = obj;
|
||||
shell.local_sculptmap = false;
|
||||
|
||||
Reference in New Issue
Block a user