-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[mono][tasks] reduce large allocations in build tasks #112295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/tasks/Common/Utils.cs:217
- Ensure that the new behavior introduced by the CompareFiles method is covered by tests. This includes scenarios where files are identical and where they differ.
private static bool CompareFiles(string filePath1, string filePath2)
4e07393
to
218f024
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/tasks/Common/Utils.cs:270
- Ensure that the new behavior in CopyIfDifferent using ContentEqual is covered by tests.
bool areDifferent = !File.Exists(dst) || !ContentEqual(src, dst);
} | ||
} | ||
|
||
#pragma warning disable IDE0060 // Remove unused parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm certain there is a difference between the text comparison and bytewise comparison but I think any value is likely an artifact of history that no longer applies. I'm happy to remove the setting at the callers and will unless someone objects.
This comment was marked as outdated.
This comment was marked as outdated.
/ba-g issue files for red BA |
It's late on a Friday so it is likely I'm missing something, but the hash comparison doesn't appear to be useful at all, that said I will assume it is useful and preserve the original behavior for now.
Use two rolling buffers to do file equality comparison since Read can return less than a full buffer, only advance a buffer once it is consumed, and compare the overlapping region.