diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-11-04 09:18:57 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-11-05 23:02:24 +0100 |
commit | d1982b369d8adbd46ebd5c78bf023cb5b8f587b4 (patch) | |
tree | 9349e5d59f8f81f66e0652d4cd5cad769df7ea85 | |
parent | a570699e7cde8e1734d9655314b1983e217db7da (diff) |
package: Do not deflate small streams in a thread
Change-Id: Iae804a34f344aa793a6d5c13315f7bc1eb64c0a2
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 5 |
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 |