mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-03 16:07:00 +00:00
f2c74b0be3
scan_iso walks an entire ISO with blocking libarchive reads, yielding only once per entry, and the header-sum branch of fingerprint reads the whole file with no yield at all. Both run in the daemon, reached from MediaImporter.init on every fingerprint and importing request. The scan costs about 8us per entry and is indifferent to media size, since libarchive seeks past file data rather than reading it: measured at 80ms for 10k entries whether the image is 0.2 GB or 8.8 GB, and at 310ms for 40k. The header-sum branch is the one that scales with size, reading a multi-gigabyte image end to end. Make the pair plain functions and hand them to a thread instead.