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:
Aleric Inglewood
2011-05-15 23:02:44 +02:00
parent 4e68f5878a
commit 93fdc2c89e
3 changed files with 71 additions and 32 deletions

View File

@@ -190,6 +190,7 @@ public:
S32 mNumDeadObjectUpdates;
S32 mNumUnknownKills;
S32 mNumDeadObjects;
S32 mMinNumDeadObjects;
protected:
std::vector<U64> mOrphanParents; // LocalID/ip,port of orphaned objects
std::vector<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects