From 2cc3ce72b3f7abf037e554b04850e627a9d8eb5f Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 9 Jun 2015 15:41:11 -0700 Subject: DD-359 : Improve performance by caching display data while updating and preventing refreshing the whole marketplace (never useful) --- indra/newview/llinventoryfunctions.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 4feb697af9..e245fd2d59 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2576,6 +2576,7 @@ void LLInventoryAction::buildMarketplaceFolders(LLFolderView* root) // containing folder will need to be updated as well as their initially containing folder. For // instance, moving a stock folder from a listed folder to another will require an update of the // target listing *and* the original listing. So we need to keep track of both. + // Note: do not however put the marketplace listings root itself in this list or the whole marketplace data will be rebuilt. sMarketplaceFolders.clear(); const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); std::set selected_items = root->getSelectionList(); @@ -2586,8 +2587,16 @@ void LLInventoryAction::buildMarketplaceFolders(LLFolderView* root) viewModel = dynamic_cast((*set_iter)->getViewModelItem()); if (viewModel && gInventory.isObjectDescendentOf(viewModel->getInventoryObject()->getParentUUID(), marketplacelistings_id)) { - sMarketplaceFolders.push_back(viewModel->getInventoryObject()->getParentUUID()); - sMarketplaceFolders.push_back(viewModel->getInventoryObject()->getUUID()); + const LLUUID &parent_id = viewModel->getInventoryObject()->getParentUUID(); + if (parent_id != marketplacelistings_id) + { + sMarketplaceFolders.push_back(parent_id); + } + const LLUUID &curr_id = viewModel->getInventoryObject()->getUUID(); + if (curr_id != marketplacelistings_id) + { + sMarketplaceFolders.push_back(curr_id); + } } } // Suppress dupes in the list so we won't update listings twice -- cgit v1.2.3