[Setup]: Use memory mapped files in LzmaUtilImpl.
This CL removes usage of LzmaFileAllocator and tries to write unpack result directly in the output file. When uncompressing a folder that maps directly to a file, this is possible and a memory mapping is used. In practice, this is always the case. Support for folder containing multiple files is kept as fallback and uses a pre-allocated file buffer, which is then copied in individual files. For running full setup install from chrome.packed.7z (Kb) Before: Setup.Install.PeakPagefileUsage 19748 Setup.Install.PeakWorkingSetSize 250528 GetCumulativeDiskUsageInBytes 761134 After: Setup.Install.PeakPagefileUsage 19720 Setup.Install.PeakWorkingSetSize 250512 GetCumulativeDiskUsageInBytes 297818 The difference in memory is not significant, but improvement are expected mostly for disk usage. Bug: 933975 Change-Id: I26c1b118fc512d2caaa8112d3da37e6db460486b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845956 Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Reviewed-by:Greg Thompson <grt@chromium.org> Cr-Commit-Position: refs/heads/master@{#709940}
Showing
This diff is collapsed.
Please register or sign in to comment