Skip to content
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. (Cherry-pick of #16617) #16648

Merged

Conversation

Eric-Arellano
Copy link
Contributor

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 |
@Eric-Arellano Eric-Arellano merged commit 5105dc1 into pantsbuild:2.14.x Aug 29, 2022
@Eric-Arellano Eric-Arellano deleted the cp-create-digest-perf-14 branch August 29, 2022 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants