[Libreoffice-commits] core.git: 2 commits - sc/source
Eike Rathke
erack at redhat.com
Sat Nov 19 18:33:54 UTC 2016
sc/source/core/data/postit.cxx | 4 +---
sc/source/filter/xml/xmlwrap.cxx | 14 ++++++++++++++
2 files changed, 15 insertions(+), 3 deletions(-)
New commits:
commit 4d73205ae4227a90d2087153c6fc82a51ea513ae
Author: Eike Rathke <erack at redhat.com>
Date: Sat Nov 19 19:32:04 2016 +0100
strip now obsolete comment part
... but keep the SdrDelayBroadcastObjectChange as it still serves during
copying notes/captions.
Change-Id: I8cf6a8045238af8d196a304ca4dfe20d4e407624
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 623a199..27dfb65 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -640,9 +640,7 @@ 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.
+ // Prevent triple change broadcasts of the same object.
SdrDelayBroadcastObjectChange aDelayChange( *maNoteData.mpCaption);
ScCaptionInitData& rInitData = *maNoteData.mxInitData;
commit 190495509e7830a5df12d002c56222209edc348d
Author: Eike Rathke <erack at redhat.com>
Date: Sat Nov 19 19:28:14 2016 +0100
sc-perf: lock drawing layer during creation of captions for Save
This gives an extra boost compared to commit
451c4cccc7e3ec3f1e046d3232cb52f6fc443f59 (see there for further details)
as it eliminates broadcasts to accessibility and thus obtaining text forwarders
and what not.
ScPostIt::CreateCaptionFromInitData() compared to that commit
from 145,055,889,118
to 63,386,691,509
Overall ScDocShell::SaveXML() from original state before that commit
Before: 370,433,720,090
After: 107,468,180,524
Reduced to 29% or speed-up by factor 3.45
Change-Id: Ife86476c9654739ed9adf25e775f7568ea9934c2
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 7aa54c0..f170f31 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -719,8 +719,22 @@ bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XComponentC
bool ScXMLImportWrapper::Export(bool bStylesOnly)
{
+ // Prevent all broadcasting and repaints and notification of accessibility
+ // during mass creation of captions, which is a major bottleneck and not
+ // needed during Save.
+ ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
+ bool bOldLock = bool();
+ if (pDrawLayer)
+ {
+ bOldLock = pDrawLayer->isLocked();
+ pDrawLayer->setLock(true);
+ }
+
rDoc.CreateAllNoteCaptions();
+ if (pDrawLayer)
+ pDrawLayer->setLock(bOldLock);
+
uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
uno::Reference<xml::sax::XWriter> xWriter = xml::sax::Writer::create(xContext);
More information about the Libreoffice-commits
mailing list