mirage / irmin

Irmin is a distributed database that follows the same design principles as Git
https://irmin.org
ISC License
1.85k stars 157 forks source link

Speed up `Store.last-modified` by comparing hashes instead of file contents #2335

Open zazedd opened 2 months ago

zazedd commented 2 months ago

This commit changes the Store.last_modified function to compare the precomputed file hashes instead of their contents, as the latter is significantly (~10 to 20x) slower. :) (More specifically, Tree.find is way slower than Tree.find_tree)


It also changes the documentation of the function where variable n is wrongly referred to as number.