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-03 12:48:43 +0200 |
commit | c0d372d7c0d9284aad8b0d5142dff7c34c062fa9 (patch) | |
tree | c843d7d036be438961c71e4de088fb357e0820f3 /include/sfx2/docfile.hxx | |
parent | 1439a09a13516f72baa735e5af332b0647d0cff7 (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>
Diffstat (limited to 'include/sfx2/docfile.hxx')
-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(); |