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

Calculate local distribution contents once per distribution (cherrypick of #14551) #14555

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Feb 22, 2022

Currently, local distribution wheel contents are computed once per consumer, rather than once per distribution. Additionally, since the calculation of provided files is using DigestContents, it is briefly pulling the entire contents of wheels into memory. For small files, this might be fine: but larger dists can use a lot of memory, particularly in the presence of concurrency.

This change moves per-distribution calculations into a separate @rule to allow for reuse across multiple consumers, and moves to computing wheel contents using an external process to allow it to be cached run over run.

[ci skip-rust]
[ci skip-build-wheels]

…ld#14551)

Currently, local distribution wheel contents are computed once per consumer, rather than once per distribution. Additionally, since the calculation of provided files is using `DigestContents`, it is briefly pulling the entire contents of wheels into memory. For small files, this might be fine: but larger dists can use a lot of memory, particularly in the presence of concurrency.

This change moves per-distribution calculations into a separate `@rule` to allow for reuse across multiple consumers, and moves to computing wheel contents using an external process to allow it to be cached run over run.
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@stuhood stuhood merged commit a606a37 into pantsbuild:2.10.x Feb 22, 2022
@stuhood stuhood deleted the stuhood/pick-14551-for-2.10.x branch February 22, 2022 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants