Remove Nicky's original outfit list performance fix that now act counterproductive and completely ignores the max processing time of the idle callback update
parent
9e3cef558c
commit
b911b63398
|
|
@ -316,11 +316,7 @@ void LLAccordionCtrl::ctrlShiftVertical(LLView* panel, S32 delta)
|
|||
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
// <FS:ND> If adding a lot of controls rapidly, calling arrange will cost a lot of times, as it's running through n! controls.
|
||||
// In that case we can avvoid calling arrange over and over and just call it once when finished.
|
||||
//void LLAccordionCtrl::addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab)
|
||||
void LLAccordionCtrl::addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab, bool aArrange)
|
||||
// </FS:ND>
|
||||
void LLAccordionCtrl::addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab)
|
||||
{
|
||||
if (!accordion_tab)
|
||||
return;
|
||||
|
|
@ -329,14 +325,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab, bool
|
|||
mAccordionTabs.push_back(accordion_tab);
|
||||
|
||||
accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, (S16)(mAccordionTabs.size() - 1)) );
|
||||
|
||||
// <FS:ND> If adding a lot of controls rapidly, calling arrange will cost a lot of times, as it's running through n! controls.
|
||||
// In that case we can avvoid calling arrange over and over and just call it once when finished.
|
||||
|
||||
// arrange();
|
||||
if( aArrange )
|
||||
arrange();
|
||||
// </FS:ND>
|
||||
arrange();
|
||||
}
|
||||
|
||||
void LLAccordionCtrl::removeCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab)
|
||||
|
|
|
|||
|
|
@ -103,11 +103,7 @@ public:
|
|||
// Call reshape after changing splitter's size
|
||||
virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
|
||||
|
||||
// <FS:ND> If adding a lot of controls rapidly, calling arrange will cost a lot of times, as it's running through n! controls.
|
||||
// In that case we can avvoid calling arrange over and over and just call it once when finished.
|
||||
// void addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab);
|
||||
void addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab, bool aArrange = true /*Standard is true as to not mess with old code all over the place*/ );
|
||||
// </FS:ND>
|
||||
void addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab);
|
||||
void removeCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab);
|
||||
void arrange();
|
||||
|
||||
|
|
|
|||
|
|
@ -220,11 +220,7 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
|
|||
|
||||
// *TODO: LLUICtrlFactory::defaultBuilder does not use "display_children" from xml. Should be investigated.
|
||||
tab->setDisplayChildren(false);
|
||||
|
||||
// <FS:ND> Calling this when there's a lot of outfits causes horrible perfomance and disconnects, due to arrange eating so many cpu cycles.
|
||||
//mAccordion->addCollapsibleCtrl(tab);
|
||||
mAccordion->addCollapsibleCtrl(tab, false);
|
||||
// </FS:ND>
|
||||
mAccordion->addCollapsibleCtrl(tab);
|
||||
|
||||
// Start observing the new outfit category.
|
||||
LLWearableItemsList* list = tab->getChild<LLWearableItemsList>("wearable_items_list");
|
||||
|
|
@ -1121,7 +1117,7 @@ void LLOutfitListBase::refreshList(const LLUUID& category_id)
|
|||
|
||||
// <FS:ND> FIRE-6958/VWR-2862; Handle large amounts of outfits, write a least a warning into the logs.
|
||||
S32 currentOutfitsAmount = (S32)mRefreshListState.Added.size();
|
||||
S32 maxSuggestedOutfits = 200;
|
||||
constexpr S32 maxSuggestedOutfits = 200;
|
||||
if (currentOutfitsAmount > maxSuggestedOutfits)
|
||||
{
|
||||
LL_WARNS() << "Large amount of outfits found: " << currentOutfitsAmount << " this may cause hangs and disconnects" << LL_ENDL;
|
||||
|
|
@ -1187,9 +1183,6 @@ void LLOutfitListBase::onIdleRefreshList()
|
|||
mRefreshListState.Added.clear();
|
||||
mRefreshListState.AddedIterator = mRefreshListState.Added.end();
|
||||
|
||||
// <FS:ND> We called mAccordion->addCollapsibleCtrl with false as second paramter and did not let it arrange itself each time. Do this here after all is said and done.
|
||||
arrange();
|
||||
|
||||
// Handle removed tabs.
|
||||
while (mRefreshListState.RemovedIterator < mRefreshListState.Removed.end())
|
||||
{
|
||||
|
|
@ -1213,8 +1206,8 @@ void LLOutfitListBase::onIdleRefreshList()
|
|||
|
||||
// Links aren't supposed to be allowed here, check only cats
|
||||
if (cat)
|
||||
{
|
||||
std::string name = cat->getName();
|
||||
{
|
||||
std::string name = cat->getName();
|
||||
updateChangedCategoryName(cat, name);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue