fix 218477 performance speedup building up flat sorted db views, r/sr=mscott

This commit is contained in:
bienvenu%nventure.com 2003-12-31 21:19:18 +00:00
Родитель b25af5350c
Коммит ee4b03e7e3
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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()