sw/source/core/txtnode/ndtxt.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 3d349d84bd8fcbb38f7809e140bc8591056c6c29
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Mar 16 16:06:34 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Mar 16 17:38:54 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.
    
    Which is not actually a lot of use for this particular bug, because it
    contains bad redline data.
    
    Change-Id: If2a7a807723ec19f15d6f7fa011d75ea82bd6d1e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131660
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 8a134276c562..6b314cf49653 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1367,8 +1367,10 @@ void SwTextNode::Update(
     if ( !bNegative && !bDelete )
     {
         const SwRedlineTable& rTable = 
GetDoc().getIDocumentRedlineAccess().GetRedlineTable();
-        for (SwRangeRedline* pRedl : rTable)
+        SwRedlineTable::size_type n = 
GetDoc().getIDocumentRedlineAccess().GetRedlinePos(*this, RedlineType::Any);
+        for( ; n < rTable.size(); ++n )
         {
+            SwRangeRedline* pRedl = rTable[ n ];
             if ( pRedl->HasMark() )
             {
                 SwPosition* const pEnd = pRedl->End();

Reply via email to