• Etienne Pierre-Doray's avatar
    [Setup]: Use memory mapped files in LzmaUtilImpl. · f5886456
    Etienne Pierre-Doray authored
    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: default avatarGreg Thompson <grt@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#709940}
    f5886456
lzma_util.h 2.71 KB