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

Package checks extremely slow with large build environments #5126

Closed
2 tasks done
mdekstrand opened this issue Dec 22, 2023 · 2 comments · Fixed by #5130
Closed
2 tasks done

Package checks extremely slow with large build environments #5126

mdekstrand opened this issue Dec 22, 2023 · 2 comments · Fixed by #5130
Assignees
Labels
in-progress issue is actively being worked on source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type

Comments

@mdekstrand
Copy link

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

When the build environment is very large, the post-packaging checks take an extremely long time. The culprit seems to be https://github.com/conda/conda-build/blob/main/conda_build/post.py#L988 (or somewhere in its call chain), where it it seems to wind up calling stat on every file in the build environment. This becomes a problem when building a Rust package, because the current Rust compiler toolchain installs documentation (35K files) and — after cargo build has completed — a copy of the cargo index (37K files). On Linux, this takes several minutes; on Windows, it takes hours. For an example of a public build that is affected, see conda-forge/deno-feedstock#79.

I determined this by two things:

  1. running strace on the conda-build while it appeared stuck, saw many stat calls
  2. ^C the stuck conda-build, found this call chain in the backtrace

I just started noticing this recently; I don't know if it is a change in conda-build or a change in how the rust compiler is packaged in conda-forge.

Conda Info

No response

Conda Config

No response

Conda list

No response

Additional Context

No response

@mdekstrand mdekstrand added the type::bug describes erroneous operation, use severity::* to classify the type label Dec 22, 2023
0xbe7a added a commit to 0xbe7a/rattler-build-feedstock that referenced this issue Dec 26, 2023
@travishathaway
Copy link
Contributor

travishathaway commented Dec 28, 2023

Hi @mdekstrand,

Thanks for reporting this. I've looked into this, and it does appear to be a performance regression from version 3.27.x to 3.28.x.

My hunch right now is that it is coming from this function:

Tagging @kenodegard as he works much more in the conda-build code base than I do.

@travishathaway travishathaway added the source::community catch-all for issues filed by community members label Dec 28, 2023
@kenodegard kenodegard self-assigned this Jan 2, 2024
@kenodegard kenodegard added the in-progress issue is actively being worked on label Jan 2, 2024
@kenodegard
Copy link
Contributor

Resolved in #5130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress issue is actively being worked on source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants