Skip to content
  • Jonathan Perkin's avatar
    Stream pkg INSERTs rather than caching everything. · bb51acba
    Jonathan Perkin authored
    Use libarchive (which we were linking against but not using) to handle
    streaming the remote pkg_summary.  The copy of decompress.c is no longer
    required.
    
    We now stream one pkg_info record at a time, rather than loading the
    entire contents in and then processing them all in one go.  They are
    still processed as part of the same commit, so there is no performance
    penalty (if anything this version is slightly faster).
    
    Using the SmartOS 2015Q1 x86_64 repository as a test corpus, heap usage
    for a clean "pkgin update" with this change goes down from 75MB to 29MB.
    bb51acba