svx/source/sdr/contact/viewobjectcontact.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit fe6a140a537eda1b6703c44ff5ee49d2ba875b81
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Dec 7 14:55:13 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Dec 8 07:44:22 2021 +0100

    used cache value in ViewObjectContact::getPrimitive2DSequence
    
    I'm not sure why we don't rely on this, it seems pretty obvious, we even
    has an explicit flush method to invalidate it.
    
    This takes the load time of a spreadsheet with a large chart from 40s to
    20s.
    
    Change-Id: I731246abb5e0c118116b70a0386b652798555503
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126477
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx 
b/svx/source/sdr/contact/viewobjectcontact.cxx
index 1dd8fef29415..bbbc1fa3f113 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -330,6 +330,9 @@ void ViewObjectContact::createPrimitive2DSequence(const 
DisplayInfo& rDisplayInf
 
 drawinglayer::primitive2d::Primitive2DContainer const & 
ViewObjectContact::getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
 {
+    if (!mxPrimitive2DSequence.empty())
+        return mxPrimitive2DSequence;
+
     /**
     This method is weird because
     (1) we have to re-walk the primitive tree because the flushing is 
unreliable

Reply via email to