You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solution to issue cannot be found in the documentation.
I checked the documentation.
Issue
rerendering recipes with a large number of variants (e.g. petsc with 44 variants, petsc4py with 223) is quite a lot slower after switching to v1.
For example, rerendering petsc (mac, m1 pro) with meta.yaml takes 20 seconds with meta.yaml and 4 minutes with v1 recipe.yaml. For petsc4py's 223 variants, it takes 27 minutes to rerender the v1 recipe compared with still only 20 seconds for v0, or rattler-build is more than 80 times slower than conda-build when rerendering.
Basically all of this time is in rattler_build_conda_compat.render.render (as measured by pyinstrument $(which conda-smithy) rerender -c auto --no-check-uptodate):
This is interesting. Currently, the way rendering works is that it calls out to rattler-build to render the recipe with a given set of variables. There are definitely many ways in which things could be optimized. It's very good to have a problematic case that we can use to benchmark against :)
I should link to the significant optimizations that happened in conda-build rerenders last year, which used to have similar performance, probably for similar reasons:
The issue wasn't actually the 223 final variants of petsc4py, but rather the ~13,000 unused variants coming from conda-forge-pinning that still get computed before being discarded. Thinning the 'used variables' as soon as possible helped a ton. I imagine the rattler-build case may be similar.
Computing 'used variables' may be a lot less fraught in v1 recipes than it is in v0, thanks to the new selectors, so maybe we can compute it earlier with more confidence. That's what held up conda/conda-build#5392 - it was too hard to compute used_variables rigorously without full renders.
I need to look into the code here again. In rattler-build we also added support for parsing conda_build_config.yaml files, so we could now even point to the original large pinning file and it should still be pretty quick.
Solution to issue cannot be found in the documentation.
Issue
rerendering recipes with a large number of variants (e.g. petsc with 44 variants, petsc4py with 223) is quite a lot slower after switching to v1.
For example, rerendering petsc (mac, m1 pro) with meta.yaml takes 20 seconds with meta.yaml and 4 minutes with v1 recipe.yaml. For petsc4py's 223 variants, it takes 27 minutes to rerender the v1 recipe compared with still only 20 seconds for v0, or rattler-build is more than 80 times slower than conda-build when rerendering.
Here's a CI rerender of petscp4y, taking 38 minutes: https://github.com/conda-forge/conda-forge-webservices/actions/runs/13052932975/job/36417048480
Basically all of this time is in
rattler_build_conda_compat.render.render
(as measured bypyinstrument $(which conda-smithy) rerender -c auto --no-check-uptodate
):Installed packages
Environment info
The text was updated successfully, but these errors were encountered: