nickjj / flask-static-digest

Flask extension to help make your static files production ready by md5 tagging and gzipping them.
MIT License
155 stars 27 forks source link

Faster hashing with SHA1 or xxhash #12

Closed eshaan7 closed 4 years ago

eshaan7 commented 4 years ago

Since the hash function (md5) used in this lib is for non-cryptography purposes, wouldn't it be better to use a faster hashing algorithm like xxhash?

https://github.com/Cyan4973/xxHash

In a project with many static files, this could give a real improvement in build time.

nickjj commented 4 years ago

Hi,

Have you done a side by side comparison of both?

Micro benchmarks rarely show the full story. For example, Rails, Django, Phoenix and other frameworks all use md5 and some really large applications (such as GitHub) are using Rails. Their assets are tagged with md5 hashes.