diff --git a/services/package/pkg_algorithm/pkg_algo_deflate.cpp b/services/package/pkg_algorithm/pkg_algo_deflate.cpp index 96be701b1376a4375df964ed2804241c743c50f9..38f6912f43cde01880bb299b0dbfb4508b8241cb 100644 --- a/services/package/pkg_algorithm/pkg_algo_deflate.cpp +++ b/services/package/pkg_algorithm/pkg_algo_deflate.cpp @@ -22,7 +22,7 @@ namespace Hpackage { constexpr uint32_t DEFLATE_IN_BUFFER_SIZE = 1024 * 64; constexpr uint32_t DEFLATE_OUT_BUFFER_SIZE = 1024 * 32; -constexpr uint32_t INFLATE_IN_BUFFER_SIZE = 1024 * 1024 * 1024; +constexpr uint32_t INFLATE_IN_BUFFER_SIZE = 100 * 1024 * 1024; constexpr uint32_t INFLATE_OUT_BUFFER_SIZE = 1024 * 1024; constexpr uint32_t INFLATE_IN_BUFFER_SIZE_NORMAL_MODE = 10 * 1024 * 1024; diff --git a/services/package/pkg_manager/pkg_managerImpl.cpp b/services/package/pkg_manager/pkg_managerImpl.cpp index 852f418c2020af6c0318844f411fe2b2034d5b5f..04f197a6366fc27a7726435d13dd4de8ecf241b2 100644 --- a/services/package/pkg_manager/pkg_managerImpl.cpp +++ b/services/package/pkg_manager/pkg_managerImpl.cpp @@ -394,10 +394,7 @@ int32_t PkgManagerImpl::LoadPackage(const std::string &packagePath, std::vector< { UPDATER_INIT_RECORD; PkgStreamPtr stream = nullptr; - // using PkgStreamType_Read type to reduce memory usage - auto streamType = (access("/bin/updater", 0) == 0) ? - PkgStream::PKgStreamType_FileMap : PkgStream::PkgStreamType_Read; - int32_t ret = CreatePkgStream(stream, packagePath, 0, streamType); + int32_t ret = CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); if (ret != PKG_SUCCESS) { PKG_LOGE("Create input stream fail %s", packagePath.c_str()); UPDATER_LAST_WORD(ret, "CreatePkgStream failed");