-
Notifications
You must be signed in to change notification settings - Fork 36
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
Calculate file hashes once #639
Conversation
Nice work! Do you have timing comparison with an all-upstream build? |
For all upstream bundles, I will check the memory usage. |
The scope of this change could be extended to reduce the memory consumption from current levels instead of increasing it. IIRC, there are many duplicate copies of file metadata. We could reduce the memory impact by collecting file metadata once for each file and use pointers to reference it when needed instead of creating multiple copies. Currently, the |
I printed runtime stats in addAllManifestFiles after all routines are done running. Found the below results. I am actually seeing improvement in memory for this implementation as well. I am still digging more into it. |
I created #641 to document how the memory usage could be reduced. |
Overall code and initial tests seems to be good. Will test more. |
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.
+1
There is a race condition where multiple files will be calculated at the same time, but the end result will still be the same. Another change can remove the race condition.
@ashleshaAtrey Can you rebase this with upstream and do a
|
Currently, mixer build update performs multiple hash calculations for each file in the chroot. Every manifest file entry and subtracted file will have their hashes calculated. It would be a significant performance improvement to calculate the hash one time for each file and re-use it. fixes clearlinux#585 Signed-off-by: Ashlesha Atrey <[email protected]>
f9f2cee
to
a46c23e
Compare
It was failing due to two versions being generated in test at the same time without changing the global variable map. Updated the code to use full path of file as key. |
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.
+1 LGTM
Currently, mixer build update performs multiple hash calculations for each file in the chroot.
Every manifest file entry and subtracted file will have their hashes calculated.
It would be a significant performance improvement to calculate the hash one time for each file and re-use it.
fixes #585
Signed-off-by: Ashlesha Atrey [email protected]