From fe6a140a537eda1b6703c44ff5ee49d2ba875b81 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 7 Dec 2021 14:55:13 +0200 Subject: 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 --- svx/source/sdr/contact/viewobjectcontact.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'svx') 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 -- cgit