diff options
author | Eike Rathke <erack@redhat.com> | 2016-11-19 01:11:21 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-11-19 15:26:16 +0100 |
commit | 451c4cccc7e3ec3f1e046d3232cb52f6fc443f59 (patch) | |
tree | f8327e93c7e6726e04d2626b6c5fdbbfbf31c5ea /include | |
parent | 87c67a4ad344cf1b7c7c9f89f2362cc82901aec3 (diff) |
sc-perf: bundle SdrObject::BroadcastObjectChange() calls during Save
Test doc https://bugs.documentfoundation.org/attachment.cgi?id=128252 from
https://bugs.documentfoundation.org/show_bug.cgi?id=103493
ScPostIt::CreateCaptionFromInitData() called through
ScDocument::CreateAllNoteCaptions()
Incl. Self Called
Before:
326,418,830,114 487,308 6,645
After:
145,055,889,118 511,681 6,645
Reduced to 44% or speed-up by factor 2.25
Overall ScDocShell::SaveXML()
Before: 370,433,720,090
After: 189,120,982,786
Reduced to 51% or speed-up by factor 1.96
There's still too much broadcasting to accessibility going on though..
Change-Id: I50555fd9751ac24006cc96b2fa8e82b32aba0748
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/svdobj.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 48558684c3b8..b398a19071aa 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -295,6 +295,7 @@ private: friend class SdrObjListIter; friend class SdrVirtObj; friend class SdrRectObj; + friend class SdrDelayBroadcastObjectChange; protected: Rectangle aOutRect; // surrounding rectangle for Paint (incl. LineWdt, ...) @@ -351,6 +352,11 @@ protected: // #i25616# bool mbSupportTextIndentingOnLineWidthChange : 1; +private: + bool mbDelayBroadcastObjectChange : 1; + mutable bool mbBroadcastObjectChangePending : 1; + +protected: // on import of OLE object from MS documents the BLIP size might be retrieved, // in this case the following member is initialized as nonempty rectangle Rectangle maBLIPSizeRectangle; @@ -968,6 +974,20 @@ private: bool mbDoNotInsertIntoPageAutomatically; }; +/** Suppress BroadcastObjectChange() until destruction of the (last) instance. + Prevents multiple broadcasts for a sequence of calls that would trigger a + broadcast each. Instances may be nested in levels, the outer instance will + trigger the final broadcast. + */ +class SVX_DLLPUBLIC SdrDelayBroadcastObjectChange +{ + SdrObject& mrObj; + bool mbOldDelayBroadcastObjectChange; +public: + SdrDelayBroadcastObjectChange( SdrObject& rObj ); + ~SdrDelayBroadcastObjectChange(); +}; + struct SdrObjCreatorParams { sal_uInt32 nInventor; |