sw/source/filter/docx/swdocxreader.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 87670fa998a26ab059e40bbe8f5e0acf0ad6ea04 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Mar 14 15:51:07 2019 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Mar 14 21:47:05 2019 +0100 DOCX autotext import: speed up handling of large amount of blocks WW8Glossary::Load() does the same for the DOC autotext import. Old cost for a document with 2508 document parts: 843842 ms. New cost for the same document: 46572 ms (5% of baseline). Change-Id: If0ff183315cb7465dd2b32c1a4fc856b50611265 Reviewed-on: https://gerrit.libreoffice.org/69271 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx index dd130751bac4..3a5edd2fd41f 100644 --- a/sw/source/filter/docx/swdocxreader.cxx +++ b/sw/source/filter/docx/swdocxreader.cxx @@ -137,7 +137,14 @@ bool SwDOCXReader::ReadGlossaries( SwTextBlocks& rBlocks, bool /* bSaveRelFiles })); if( xFilter->filter( aDescriptor ) ) - return MakeEntries( static_cast<SwDocShell*>( &xDocSh )->GetDoc(), rBlocks ); + { + if (rBlocks.StartPutMuchBlockEntries()) + { + bool bRet = MakeEntries(static_cast<SwDocShell*>(&xDocSh)->GetDoc(), rBlocks); + rBlocks.EndPutMuchBlockEntries(); + return bRet; + } + } } return false; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits