summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-06-03 12:47:18 +0300
committerMike Antipov <mantipov@productengine.com>2010-06-03 12:47:18 +0300
commit5459e26392e3b3b80c0bf8bbc930d0a93ee8e214 (patch)
tree0cad66d82b60015c0dbac5b4603ed150b9c8e073 /indra
parent86c230e4902ec06bb65e81b638d60e6b80b51613 (diff)
EXT-7503 WIP Made first inventory fetch for Add to Outfit panel on the first openning, updated reliability of LLInventoryFetchItemsObserver
* Moved initialization (with start fetch) of the LLFilteredWearableListManager into LLPanelOutfitEdit::onOpen * LLFilteredWearableListManager::changed now ignores non-related inventory changes (CALLING_CARD, GESTURE, SORT) Tried to fix an issue with empty Gesture list on startup with clean inventory cache. Reason: logic is based on count of "inventory changed" events. In case of there was too many requests requested items can be removed from queue by mistake. * Increased a number of the "change()" method calls to wait fetched items. Unfortunately this only works if My Inventory category does not have too many children. An does not work if it has 2000+ items Logic to remove item from the incompleted list should be based on timer and number of attempts. Also add some debug information about fetching inventory category and its content to log. Reviewed by Brad Payne at https://codereview.productengine.com/secondlife/r/456/ --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfilteredwearablelist.cpp9
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp2
-rw-r--r--indra/newview/llinventoryobserver.cpp2
-rw-r--r--indra/newview/llpaneloutfitedit.cpp4
-rw-r--r--indra/newview/llviewerinventory.cpp1
5 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp
index 28e159421c..0c13bbcab7 100644
--- a/indra/newview/llfilteredwearablelist.cpp
+++ b/indra/newview/llfilteredwearablelist.cpp
@@ -54,6 +54,15 @@ LLFilteredWearableListManager::~LLFilteredWearableListManager()
void LLFilteredWearableListManager::changed(U32 mask)
{
+ if (LLInventoryObserver::CALLING_CARD == mask
+ || LLInventoryObserver::GESTURE == mask
+ || LLInventoryObserver::SORT == mask
+ )
+ {
+ // skip non-related changes
+ return;
+ }
+
if(!gInventory.isInventoryUsable())
{
return;
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 0ff6ab2644..b4f0947b2c 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -112,6 +112,8 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive
{
if (!mAllFoldersFetched)
{
+ LL_DEBUGS("InventoryFetch") << "Start fetching category: " << cat_id << ", recursive: " << recursive << LL_ENDL;
+
mBackgroundFetchActive = TRUE;
if (cat_id.isNull())
{
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 8557548887..d2b402fe14 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -68,7 +68,7 @@
// you're fetching an item and a notification gets triggered because
// you renamed some other item). This counter is to specify how many
// notification to wait for before giving up.
-static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 20;
+static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 127;
LLInventoryObserver::LLInventoryObserver()
{
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 85b4259a29..0ca5938c97 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -311,7 +311,6 @@ BOOL LLPanelOutfitEdit::postBuild()
mWearableItemsPanel = getChild<LLPanel>("filtered_wearables_panel");
mWearableItemsList = getChild<LLInventoryItemsList>("filtered_wearables_list");
- mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mWearableListMaskCollector);
mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
return TRUE;
@@ -322,6 +321,9 @@ void LLPanelOutfitEdit::onOpen(const LLSD& key)
{
if (!mInitialized)
{
+ // *TODO: this method is called even panel is not visible to user because its parent layout panel is hidden.
+ // So, we can defer initializing a bit.
+ mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mWearableListMaskCollector);
displayCurrentOutfit();
mInitialized = true;
}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 77b0d9f8d3..4cb5e86fc2 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -606,6 +606,7 @@ bool LLViewerInventoryCategory::fetch()
if((VERSION_UNKNOWN == mVersion)
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
{
+ LL_DEBUGS("InventoryFetch") << "Fetching category children: " << mName << ", UUID: " << mUUID << LL_ENDL;
const F32 FETCH_TIMER_EXPIRY = 10.0f;
mDescendentsRequested.reset();
mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY);