-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMPROVEMENT] No longer checks hash when searching files #132
Conversation
Also Closes #123 , since the segfault occurs at the hash-check. |
I'm not sure I understand... If we don't check the hash, how can we decide whether this is the same file object? [trivia: there is exactly one (1) system call whose result can be cached, i.e., a second call will generate the same result. Everything else has to be checked every time.] |
The reason we tested with (1) If for example
So there are scenarios where ignoring the
In other words, i am asking you if you can pinpoint any scenario where the first file to match I've found one so far, it's when the process uses We could even make a dummy test about this by taking the I will perform this exact test and post the results. |
The results when compiling the xbps project(about 8sec compile time) is that only 3 passed the first test and failed the second. As you mentioned this isn't our current goals, but if we can get that number down to 0 it's gonna be a very worthwhile optimization in the future. |
We are not talking about an isolated system. Don't over-think it; there are cases where even without recording any write action you cannot say the file is the same. Example: you run But unbeknownst to you, an Without checking the hash, you would report that the older version of the compiler was used in the second compilation, which is not correct. |
@zvr Well yes i made the assumption that the files the build process handles aren't updated by external means. If we are to deal with such a scenario this pull request is indeed invalid. And thus I close it. |
@zvr We definitely need to look for ways to skip hashing files in the future though, one thing i can think of is checking modification dates. |
Modifications dates can be set arbitrarily, so they can't be used to actually determine whether something has been modified. Check |
@zvr All this time i thought Well we will see in the future I guess... |
The changes described at #131, Closes #131