Hi, It is my understanding that in the ccache hit case, a significant fraction of the running time is spent computing hashes of the original source files.
git is also frequently used for development, makes use of file hashes, and is extremely fast. When doing operations such as git diff, in the common case where the source file has not been modified, git will notice that the file's attributes (including mtime) matches these stored in the git index file, and thus it won't have to actually read the file to conclude that the contents have not changed. I often use ccache to compile files out of git trees, and I was thinking that it could make use of the git index as well. The idea would be to use sha1 hashes instead of md4, and get these hashes out of the index (rather than computing them from the source file) when the file attributes match. I am wondering, has this been considered before ? what would project maintainers think of going that direction ? Thanks, -- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies. _______________________________________________ ccache mailing list ccache@lists.samba.org https://lists.samba.org/mailman/listinfo/ccache