sw/source/core/unocore/unoportenum.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 2c8933594a4ea955eb4e785c7507d011c96c2aad Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Mar 17 08:58:14 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Mar 17 09:01:55 2022 +0100 tdf#148013 speed up loading large file with lots of redlines We can skip lots of the table by using the binary search. Change-Id: I8c85cd4700bd1859cdc61a08159c61b1ab632163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index a16ace3fa373..2dd92b0c71f0 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -1067,7 +1067,8 @@ static void lcl_FillRedlineArray( const SwPosition* pStart = rUnoCursor.GetPoint(); const SwNodeIndex nOwnNode = pStart->nNode; - for(size_t nRed = 0; nRed < nRedTableCount; ++nRed) + SwRedlineTable::size_type nRed = rDoc.getIDocumentRedlineAccess().GetRedlinePos(nOwnNode.GetNode(), RedlineType::Any); + for(; nRed < nRedTableCount; ++nRed) { const SwRangeRedline* pRedline = rRedTable[nRed]; const SwPosition* pRedStart = pRedline->Start();