зеркало из https://github.com/mozilla/gecko-dev.git
fix 218477 performance speedup building up flat sorted db views, r/sr=mscott
This commit is contained in:
Родитель
b25af5350c
Коммит
ee4b03e7e3
|
@ -229,6 +229,10 @@ nsresult nsMsgThreadedDBView::AddKeys(nsMsgKey *pKeys, PRInt32 *pFlags, const ch
|
|||
m_flags.Add(flag);
|
||||
m_levels.Add(pLevels[i]);
|
||||
numAdded++;
|
||||
// we expand as we build the view, which allows us to insert at the end of the key array,
|
||||
// instead of the middle, and is much faster.
|
||||
if (!(m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay) && flag & MSG_FLAG_ELIDED)
|
||||
ExpandByIndex(m_keys.GetSize() - 1, NULL);
|
||||
}
|
||||
return numAdded;
|
||||
}
|
||||
|
@ -495,7 +499,7 @@ void nsMsgThreadedDBView::OnExtraFlagChanged(nsMsgViewIndex index, PRUint32 extr
|
|||
|
||||
void nsMsgThreadedDBView::OnHeaderAddedOrDeleted()
|
||||
{
|
||||
ClearPrevIdArray();
|
||||
ClearPrevIdArray();
|
||||
}
|
||||
|
||||
void nsMsgThreadedDBView::ClearPrevIdArray()
|
||||
|
|
Загрузка…
Ссылка в новой задаче