diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-03 10:03:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-04 09:35:00 +0200 |
commit | 77219c88ac0a44b3ed5dada67d0d9ca52fa3adec (patch) | |
tree | b7b8cc3cf4dce7d3fdbddb38ae71d086a4b087ad /include | |
parent | 6fdd1dc34f497fce28f85807126e56432a3cb7d2 (diff) |
tdf#67538 XTypeDetection::queryTypeByDescriptor poor performance, part2
SfxMedium was creating a temporary file and copying the input file, when
CloseInStream_Impl was called from the destructor. Very very bad for
performance.
This is specifically fixing the performance of queryTypeByDescriptor
when called from a basic macro on a local test file.
This takes my test macro from 16.1s to 9s.
Change-Id: If52f8e0587c7b11666893f6cb79b3180d45cce43
Reviewed-on: https://gerrit.libreoffice.org/73375
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit c0d372d7c0d9284aad8b0d5142dff7c34c062fa9)
Reviewed-on: https://gerrit.libreoffice.org/73399
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/docfile.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index a8fae8409bb9..77950a473197 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -60,9 +60,9 @@ class SFX2_DLLPUBLIC SfxMedium : public SvRefBase std::unique_ptr< SfxMedium_Impl > pImpl; SAL_DLLPRIVATE void SetIsRemote_Impl(); - SAL_DLLPRIVATE void CloseInStream_Impl(); + SAL_DLLPRIVATE void CloseInStream_Impl(bool bInDestruction = false); SAL_DLLPRIVATE void CloseOutStream_Impl(); - SAL_DLLPRIVATE void CloseStreams_Impl(); + SAL_DLLPRIVATE void CloseStreams_Impl(bool bInDestruction = false); SAL_DLLPRIVATE void SetEncryptionDataToStorage_Impl(); @@ -121,7 +121,7 @@ public: const OUString& GetOrigURL() const; SfxItemSet * GetItemSet() const; - void Close(); + void Close(bool bInDestruction = false); void CloseAndRelease(); void ReOpen(); void CompleteReOpen(); |