From 7b99314d846483167c665fabf8092e604554321c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 20 Feb 2015 15:54:27 -0500 Subject: MAINT-4653, DRTVWR-397 WIP - more code for tracking attachment operations, smarter handling of multiple requests. --- indra/newview/llinventorybridge.cpp | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1910656066..0af60c0953 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5374,6 +5374,8 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach LL_WARNS() << "duplicate attachment request, ignoring" << LL_ENDL; return; } + + LL_DEBUGS("Avatar") << "ATT add rez request for " << item->getName() << " id " << item_id << LL_ENDL; gAgentAvatarp->addAttachmentRequest(item_id); S32 attach_pt = 0; @@ -5424,33 +5426,13 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response) if (itemp) { - /* - { - U8 attachment_pt = notification["payload"]["attachment_point"].asInteger(); - - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_RezSingleAttachmentFromInv); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_ObjectData); - msg->addUUIDFast(_PREHASH_ItemID, itemp->getUUID()); - msg->addUUIDFast(_PREHASH_OwnerID, itemp->getPermissions().getOwner()); - msg->addU8Fast(_PREHASH_AttachmentPt, attachment_pt); - pack_permissions_slam(msg, itemp->getFlags(), itemp->getPermissions()); - msg->addStringFast(_PREHASH_Name, itemp->getName()); - msg->addStringFast(_PREHASH_Description, itemp->getDescription()); - msg->sendReliable(gAgent.getRegion()->getHost()); - return false; - } - */ - // Queue up attachments to be sent in next idle tick, this way the // attachments are batched up all into one message versus each attachment // being sent in its own separate attachments message. U8 attachment_pt = notification["payload"]["attachment_point"].asInteger(); BOOL is_add = notification["payload"]["is_add"].asBoolean(); + LL_DEBUGS("Avatar") << "ATT calling addAttachment " << (itemp ? itemp->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; LLAttachmentsMgr::instance().addAttachment(item_id, attachment_pt, is_add); -- cgit v1.2.3 From 58ab202aa2615df8038ac8c47e2f170c06a990a6 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 24 Feb 2015 16:19:14 -0500 Subject: MAINT-4917 WIP - batch COF link request before batch attachment request. Should only generate one bake request. --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 0af60c0953..32d1da434e 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5371,7 +5371,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach (gAgentAvatarp->attachmentWasRequested(item_id) || gAgentAvatarp->isWearingAttachment(item_id))) { - LL_WARNS() << "duplicate attachment request, ignoring" << LL_ENDL; + LL_WARNS() << "ATT duplicate attachment request, ignoring" << LL_ENDL; return; } -- cgit v1.2.3 From 090d3097d569922b7c3b681cb77ff14a29a60b07 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 18 Mar 2015 21:41:47 -0400 Subject: MAINT-4917 WIP - Attachment deferred bulk COF linking WIP --- indra/newview/llinventorybridge.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 32d1da434e..e44de6f91e 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5367,17 +5367,15 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach const LLUUID& item_id = item->getLinkedUUID(); // Check for duplicate request. + const F32 MAX_TIME_SINCE_REQUEST = 5.0F; if (isAgentAvatarValid() && - (gAgentAvatarp->attachmentWasRequested(item_id) || + (LLAttachmentsMgr::instance().attachmentWasRequestedRecently(item_id, MAX_TIME_SINCE_REQUEST) || gAgentAvatarp->isWearingAttachment(item_id))) { LL_WARNS() << "ATT duplicate attachment request, ignoring" << LL_ENDL; return; } - LL_DEBUGS("Avatar") << "ATT add rez request for " << item->getName() << " id " << item_id << LL_ENDL; - gAgentAvatarp->addAttachmentRequest(item_id); - S32 attach_pt = 0; if (isAgentAvatarValid() && attachment) { @@ -5432,10 +5430,8 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response) U8 attachment_pt = notification["payload"]["attachment_point"].asInteger(); BOOL is_add = notification["payload"]["is_add"].asBoolean(); - LL_DEBUGS("Avatar") << "ATT calling addAttachment " << (itemp ? itemp->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; - LLAttachmentsMgr::instance().addAttachment(item_id, - attachment_pt, - is_add); + LL_DEBUGS("Avatar") << "ATT calling addAttachmentRequest " << (itemp ? itemp->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; + LLAttachmentsMgr::instance().addAttachmentRequest(item_id, attachment_pt, is_add); } } return false; -- cgit v1.2.3 From 8963185f5bea5af8ede04f41423ae1f822d80899 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Mar 2015 17:05:55 -0400 Subject: MAINT-4917 WIP - comments and bug fixes for batching up COF link requests after attachments added. --- indra/newview/llinventorybridge.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e44de6f91e..bab86bc2e5 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5367,10 +5367,8 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach const LLUUID& item_id = item->getLinkedUUID(); // Check for duplicate request. - const F32 MAX_TIME_SINCE_REQUEST = 5.0F; if (isAgentAvatarValid() && - (LLAttachmentsMgr::instance().attachmentWasRequestedRecently(item_id, MAX_TIME_SINCE_REQUEST) || - gAgentAvatarp->isWearingAttachment(item_id))) + gAgentAvatarp->isWearingAttachment(item_id)) { LL_WARNS() << "ATT duplicate attachment request, ignoring" << LL_ENDL; return; -- cgit v1.2.3