diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2020-01-11 11:48:42 +0530 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.com> | 2020-01-13 12:09:28 +0100 |
commit | d98cc8f881673f64f0a1fa35eea8610fb5b083e3 (patch) | |
tree | a951a60ac4946f260710b10c411c83f0ff757da4 /package | |
parent | 714b7a76665655dc5d090c6ab4a715c085b52739 (diff) |
Revert "tdf#125662: disable parallel-zip if the memory..."
This reverts commit 0b8ae8725083eb0526a262d434cc06fb3f3e7336.
A better fix will follow this patch.
Change-Id: I4ff8d71bf2401bae2e2071c369e3746b8b7c72bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86595
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index d8f9c594d89f..745157cfd02e 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -48,7 +48,6 @@ #include <comphelper/seekableinput.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/storagehelper.hxx> -#include <comphelper/meminfo.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> @@ -769,9 +768,7 @@ bool ZipPackageStream::saveChild( // the full size, but it appears that at this point it usually is. sal_Int64 estimatedSize = xSeek.is() ? xSeek->getLength() : xStream->available(); - // ZipOutputEntryParallel/ThreadedDeflater needs to allocate ~twice the estimatedSize. - // Check if we can allocate that much without breaching addressable memory limits. - if (estimatedSize > 1000000 && comphelper::canAlloc(2*estimatedSize)) + if (estimatedSize > 1000000) { // Use ThreadDeflater which will split the stream into blocks and compress // them in threads, but not in background (i.e. writeStream() will block). |