Skip to content
Snippets Groups Projects
Forked from Reproducible Builds / diffoscope
Source project has a limited visibility.
  • Jérémy Bobbio's avatar
    15981bcf
    Prevent CBFS comparator from scanning big files needlessly · 15981bcf
    Jérémy Bobbio authored
    To recognize CBFS images, we fall back on looking for the magic number
    by scanning the entire file. This is expensive! In order to speed up
    diffoscope, we assume that any file bigger than 24 MiB will not be a CBFS
    image. That's a reasonable assumption given that, as of today, the biggest
    image produced by coreboot is 16 MiB.
    
    We also now try to identify CBFS images last. This means other formats have a
    chance to be recognized before the file gets fully scanned.
    
    Thanks Mike Hommey for the detailed bug report and suggestions.
    
    Closes: #807997
    15981bcf
    History
    Prevent CBFS comparator from scanning big files needlessly
    Jérémy Bobbio authored
    To recognize CBFS images, we fall back on looking for the magic number
    by scanning the entire file. This is expensive! In order to speed up
    diffoscope, we assume that any file bigger than 24 MiB will not be a CBFS
    image. That's a reasonable assumption given that, as of today, the biggest
    image produced by coreboot is 16 MiB.
    
    We also now try to identify CBFS images last. This means other formats have a
    chance to be recognized before the file gets fully scanned.
    
    Thanks Mike Hommey for the detailed bug report and suggestions.
    
    Closes: #807997