Skip to content
Snippets Groups Projects
  • Pierre-Yves David's avatar
    c564be351754
    rev-branch-cache: stop truncating cache file · c564be351754
    Pierre-Yves David authored
    Truncating the file prevent the safe use of mmap. So instead of overwrite the
    existing data. If more than 20% of the file is to be overwritten, we rewrite the
    whole file instead.
    
    Such whole rewrite is done by replacing the old one with a new one, so mmap of
    the old file would be affected.
    
    This prepare a more aggressive use of mmap in later patches.
    c564be351754
    History
    rev-branch-cache: stop truncating cache file
    Pierre-Yves David authored
    Truncating the file prevent the safe use of mmap. So instead of overwrite the
    existing data. If more than 20% of the file is to be overwritten, we rewrite the
    whole file instead.
    
    Such whole rewrite is done by replacing the old one with a new one, so mmap of
    the old file would be affected.
    
    This prepare a more aggressive use of mmap in later patches.