• Jay Civelli's avatar
    Changing the FileAccessor API in zip.h to improve perfs over IPC. · d0cb5e40
    Jay Civelli authored
    When using zip::Zip() with an IPC based FileAccessor, zipping
    directories with large number of files triggers many IPC calls
    making the entire operation significantly slower than with direct file
    access.
    In order to alleviate this performance hit, this patch groups file
    reads by modifying the FileAccessor read method so it reads multiple
    files at once. zip::Zip() can then group these reads when writing the
    ZIP file.
    The writing code has been factored out into a new ZipWriter class to
    make that code more readable.
    
    Bug: 773310
    Change-Id: I8121980bf05d87a174c63164840ec6bf325c7e52
    Reviewed-on: https://chromium-review.googlesource.com/719356
    Commit-Queue: Jay Civelli <jcivelli@chromium.org>
    Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#509693}
    d0cb5e40
zip.cc 7.67 KB