Skip to content

Hashing performance improvements

Benjamin Winger requested to merge bmwinger/portmod:hash_cache into master

This Memoizes calls to get_hash, as files are unlikely to change during program execution, as well as ensures we only hash files when necessary in get_download_size (called whenever we display the merge list to the user).

Validating hashes of source files is one of the biggest performance bottlenecks at the moment (behind extracting and later installing those files), and while there is little we can do about hashing faster (with that being IO limited), we can certainly avoid unnecessary calls to get_hash.

Merge request reports