summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 90f0df8e4da8..5eaa6e951220 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -798,6 +798,11 @@ bool ZipPackageStream::saveChild(
else
{
bParallelDeflate = true;
+ // Do not deflate small streams in a thread
+ uno::Reference< io::XSeekable > xSeek( xStream, uno::UNO_QUERY );
+ if (xSeek.is() && xSeek->getLength() < 100000)
+ bParallelDeflate = false;
+
if (bParallelDeflate)
{
// Start a new thread deflating this zip entry