diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-22 16:12:23 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-05-28 20:58:15 +0200 |
commit | 79fb7ca1bb692c60bdc80e03d732976f68df2dd4 (patch) | |
tree | 3de60c5c637648643be0d4fedfc47ab6c65f1635 | |
parent | ab0274f61e6b4f516614520175bdfe628d9ceca7 (diff) |
tdf#155410 speedup shutdown when document has lots of images
prevent unnecessary broadcasting during teardown of draw model
regression from
commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3
ref-count SdrObject
The above patch seems to have changed the destruction ordering and now
we do lots of unnecessary broadcasting.
Change-Id: I90f4e560bc82834246a323275d13ef8ee8abeae0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152140
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 4fac9a110961f19006c3041be0c4b920a5eafe7b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152104
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 5b14cd43842b..1ef5049e7982 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1145,7 +1145,14 @@ SwView::~SwView() m_pViewImpl->Invalidate(); EndListening(*GetViewFrame()); EndListening(*GetDocShell()); + + // tdf#155410 speedup shutdown, prevent unnecessary broadcasting during teardown of draw model + auto pDrawModel = GetWrtShell().getIDocumentDrawModelAccess().GetDrawModel(); + const bool bWasLocked = pDrawModel->isLocked(); + pDrawModel->setLock(true); m_pWrtShell.reset(); // reset here so that it is not accessible by the following dtors. + pDrawModel->setLock(bWasLocked); + m_pHScrollbar.disposeAndClear(); m_pVScrollbar.disposeAndClear(); m_pHRuler.disposeAndClear(); |