sw/source/core/doc/DocumentRedlineManager.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit d996563ef15892aace8c6b31fe3d2097cbbd6093 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jul 18 15:04:28 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Jul 18 16:12:57 2022 +0200 tdf#119840 exit loop early in DocumentRedlineManager::AppendRedline reduces load time by approx 5% Change-Id: I2e82655055fc7b3b7777444a2c9a33d813faa88e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index fb7580a4862f..2c8fe11ae062 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -1361,6 +1361,9 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall SwComparePosition eCmpPos = ComparePosition( *pStt, *pEnd, *pRStt, *pREnd ); + if ( SwComparePosition::Before == eCmpPos && !IsPrevPos( *pEnd, *pRStt )) + break; + switch( pNewRedl->GetType() ) { case RedlineType::Insert: