diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2012-10-15 21:34:29 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2012-10-15 21:34:29 -0600 |
commit | c0ba626c8009b22310b3923e8170e5db2a021253 (patch) | |
tree | 2ff3cd6737b6c8bbafbecab7ddce5e4c463b8852 /indra/newview/llviewermessage.cpp | |
parent | 041dfccd1ea5b59c1b3c4e37e9a5495cad342c8f (diff) |
For SH-3333: Design and implement a new object cache system on viewer side
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-x | indra/newview/llviewermessage.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ec7d91ec4f..67d400af2d 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4490,12 +4490,22 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) LLUUID id; U32 local_id; - S32 i; + S32 i = 0; S32 num_objects; num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData); - for (i = 0; i < num_objects; i++) + mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); + LLViewerRegion* regionp = NULL; + bool remove_from_cache = !local_id; //if the first local id is 0, physically remove all objects from VO cache. + if(remove_from_cache) + { + i++; + + LLHost host(gMessageSystem->getSenderIP(), gMessageSystem->getSenderPort()); + regionp = LLWorld::getInstance()->getRegion(host); + } + for (; i < num_objects; i++) { mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); @@ -4530,10 +4540,15 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) // Do the kill gObjectList.killObject(objectp); } - else + //else + //{ + // LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL; + // gObjectList.mNumUnknownKills++; + //} + + if(remove_from_cache) { - LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL; - gObjectList.mNumUnknownKills++; + regionp->killCacheEntry(local_id); } } |