-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
Optimize CreateDigest
implementation.
#16617
Optimize CreateDigest
implementation.
#16617
Conversation
* Use a `DigestTrie` to create all snapshots at once, instead of creating them individually * Store all in-memory file contents in a single (batched) call, instead of storing them individually [ci skip-build-wheels]
Omg epic. @stuhood definitely cherry-pick this to 2.14. Thoughts on 2.13? I'm hoping to do an RC tonight if I can get CI green. |
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.
Looks great! Thanks.
For sure |
It's not strictly needed, and skipping it can avoid a lot of IO. [ci skip-build-wheels]
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.
Thanks!
Closes pantsbuild#16570 * Use a `DigestTrie` to create all snapshots at once, instead of creating them individually * Store all in-memory file contents in a single (batched) call, instead of storing them individually [ci skip-build-wheels] --- I restored the benchmark script from pantsbuild#14569 to test this. | size | create_digest_before | create_digest_after | | --- | --- | --- | | 20000 | 608 | 130 | | 40000 | 1164 | 268 | | 60000 | 2260 | 475 | | 80000 | 3582 | 674 | | 100000 | 5085 | 862 | | 120000 | 6765 | 1057 | | 140000 | 8818 | 1067 | | 160000 | 10752 | 1361 | | 180000 | 12619 | 1604 |
Closes #16570 * Use a `DigestTrie` to create all snapshots at once, instead of creating them individually * Store all in-memory file contents in a single (batched) call, instead of storing them individually [ci skip-build-wheels] --- I restored the benchmark script from #14569 to test this. | size | create_digest_before | create_digest_after | | --- | --- | --- | | 20000 | 608 | 130 | | 40000 | 1164 | 268 | | 60000 | 2260 | 475 | | 80000 | 3582 | 674 | | 100000 | 5085 | 862 | | 120000 | 6765 | 1057 | | 140000 | 8818 | 1067 | | 160000 | 10752 | 1361 | | 180000 | 12619 | 1604 |
Closes pantsbuild#16570 * Use a `DigestTrie` to create all snapshots at once, instead of creating them individually * Store all in-memory file contents in a single (batched) call, instead of storing them individually [ci skip-build-wheels] --- I restored the benchmark script from pantsbuild#14569 to test this. | size | create_digest_before | create_digest_after | | --- | --- | --- | | 20000 | 608 | 130 | | 40000 | 1164 | 268 | | 60000 | 2260 | 475 | | 80000 | 3582 | 674 | | 100000 | 5085 | 862 | | 120000 | 6765 | 1057 | | 140000 | 8818 | 1067 | | 160000 | 10752 | 1361 | | 180000 | 12619 | 1604 |
Closes #16570
DigestTrie
to create all snapshots at once, instead of creating them individually[ci skip-build-wheels]
I restored the benchmark script from #14569 to test this. The results seem almost too good to be true, but here they are 🤔
Somebody should probably double-check those numbers 😅 I'll re-run on my machine to sanity-check it as well