Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
DirTrack: check both size and mtime for cached entries #4038
I ended up using an experimental branch of orb (rjbou/orb#1) which:
now, the checksum1 and checksum0 were equal, although manually checking the md5 of the files in the old and new lead to different results (checksum1 contained wrong data). the byte size of the binaries was equal, but not their mtime.
in general, I'm not entirely convinced of this cache (i can generate a equally-sized and equal mtime file at any point in time, whose data is different), does it really lead to better performance in the general setting? in my experiments, I use each digest only once anyways.
@rjbou as commented above, if the cache is not useful, I'd be in favour of removing it entirely. If the cache is useful, this is a fix for it.
Hm, I don't remember precisely, but indeed this is very suspicious (in particular the
For the use that opam has of this module, it would repeatedly scan the whole prefix between each package installs, so having such a cache made sense (assuming that no package install modified files while forging their
Of course, now opam by default goes the full way of only using the size+mtime (with a correct
So the question is, does this middle-way "precise tracking" still make sense ? I don't think anyone uses it (@rjbou found out it had been broken for months, if not years, a while ago).