Closed AndreyDobrovolskyOdessa closed 1 year ago
Hi, Leah! This patch may give small performance gain. Let me explain by an example.
We have simple dependency chain: a -> b -> c -> d.
If file d is not updated, check_deps() will calculate,b,c,d hashes and test b,c dependencies. If file d is updated and changed, then check_deps() will calculate b,c,d hashes and test b,c dependencies.
After applying this patch:
If file d is not updated, check_deps() will test b,c dependencies and calculate,b,c,d hashes - just the same as above. If file d is updated and changed, then check_deps() will test b,c dependencies and will not calculate b,c hashes.
Hashes are fast, but if changes reside deep inside dependency tree, calculating hashes appears to be just an environment heating :)
For big files getting hash may appear to be time-consuming. Calling check_deps() before hash calculation of dependency file may save some time in case rebuild is triggered by the changes in the small dependency file of big target.