summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-11-19 01:11:21 +0100
committerEike Rathke <erack@redhat.com>2016-11-19 15:26:16 +0100
commit451c4cccc7e3ec3f1e046d3232cb52f6fc443f59 (patch)
treef8327e93c7e6726e04d2626b6c5fdbbfbf31c5ea /sc
parent87c67a4ad344cf1b7c7c9f89f2362cc82901aec3 (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 'sc')
-rw-r--r--sc/source/core/data/postit.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 18da0ce9367d..623a19913dc9 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -640,6 +640,11 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const
ScNoteCaptionCreator aCreator( mrDoc, rPos, maNoteData );
if( maNoteData.mpCaption )
{
+ // Prevent triple change broadcasts of the same object, which
+ // during Save triggered by ScDocument::CreateAllNoteCaptions()
+ // creates a major performance bottleneck.
+ SdrDelayBroadcastObjectChange aDelayChange( *maNoteData.mpCaption);
+
ScCaptionInitData& rInitData = *maNoteData.mxInitData;
// transfer ownership of outliner object to caption, or set simple text