diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-07 14:55:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-08 07:44:22 +0100 |
commit | fe6a140a537eda1b6703c44ff5ee49d2ba875b81 (patch) | |
tree | 2e6feeaf2c715292349b0f4262a94b80b25a287a /svx | |
parent | 7e5af164b7d293dd410710bed411e1ca64bbecf7 (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontact.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
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 |