[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 2 12:14:24 UTC 2019


 sw/source/core/txtnode/ndtxt.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 8917f812cdf28d7ce8907d7a5971749c3ec8815d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Apr 1 17:03:05 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Apr 2 14:14:00 2019 +0200

    tdf#122926 FILEOPEN ODT Slower compared to the past
    
    on my machine, this takes the time from 12.3s to 8.9s
    
    This also includes ba748771cadb294d6af7b7c784c33ccf8632dff1
    
    tdf#122926 FILEOPEN ODT Slower compared to the past (part2)
    Further improvement: on my machine, this takes the time from 8.9s to
    5.7s
    
    Change-Id: Ibdc7e3c34d1acb0d1f7f784720552fa6c7977fa5
    Reviewed-on: https://gerrit.libreoffice.org/70074
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 9634f5ee73e57e8cef75461316d5d45b06ee104f)
    Reviewed-on: https://gerrit.libreoffice.org/70091

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 02330c6e811e..0a98d0fd4539 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1396,7 +1396,7 @@ void SwTextNode::Update(
             bool bAtLeastOneBookmarkMoved = false;
             bool bAtLeastOneExpandedBookmarkAtInsertionPosition = false;
             // A text node already knows its marks via its SwIndexes.
-            std::set<const sw::mark::IMark*> aSeenMarks;
+            o3tl::sorted_vector<const sw::mark::IMark*> aSeenMarks;
             const SwIndex* next;
             for (const SwIndex* pIndex = GetFirstIndex(); pIndex; pIndex = next )
             {
@@ -1405,9 +1405,8 @@ void SwTextNode::Update(
                 if (!pMark)
                     continue;
                 // Only handle bookmarks once, if they start and end at this node as well.
-                if (aSeenMarks.find(pMark) != aSeenMarks.end())
+                if (!aSeenMarks.insert(pMark).second)
                     continue;
-                aSeenMarks.insert(pMark);
                 const SwPosition* pEnd = &pMark->GetMarkEnd();
                 SwIndex & rEndIdx = const_cast<SwIndex&>(pEnd->nContent);
                 if( this == &pEnd->nNode.GetNode() &&


More information about the Libreoffice-commits mailing list