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

Speed up rendering by avoiding costly/redundant function calls #5248

Closed
wants to merge 7 commits into from

Conversation

mbargull
Copy link
Member

@mbargull mbargull commented Mar 21, 2024

Description

Address some points of gh-5224.
This cherry-picks small (hopefully) non-controversial parts from gh-5225.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • [ ] Add / update necessary tests?
  • [ ] Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Mar 21, 2024
@mbargull mbargull force-pushed the render-speedups-func-calls branch from 7a6ec16 to dd6d546 Compare March 21, 2024 16:42
Copy link

codspeed-hq bot commented Mar 21, 2024

CodSpeed Performance Report

Merging #5248 will improve performances by 63.68%

Comparing mbargull:render-speedups-func-calls (989cb90) with main (15f3323)

Summary

⚡ 1 improvements
✅ 2 untouched benchmarks

Benchmarks breakdown

Benchmark main mbargull:render-speedups-func-calls Change
test_pin_subpackage_benchmark 122.8 s 75 s +63.68%

@mbargull mbargull force-pushed the render-speedups-func-calls branch from dd6d546 to c5a74b3 Compare March 21, 2024 21:54
@mbargull mbargull changed the title Speed up rendering slightly by avoiding costly/redundant function calls Speed up rendering by avoiding costly/redundant function calls Mar 21, 2024
@mbargull mbargull marked this pull request as ready for review March 21, 2024 21:58
@mbargull mbargull requested a review from a team as a code owner March 21, 2024 21:58
@mbargull mbargull force-pushed the render-speedups-func-calls branch from 937552c to f208ed3 Compare March 21, 2024 22:03
Comment on lines +1 to +19
### Enhancements

* Speed up rendering by avoiding costly/redundant function calls. (#5248)

### Bug fixes

* <news item>

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm impartial on whether we should or should not include this news entry (meaning, I don't necessarily consider this a "significant" change).
We can include it if we want to track such changes more obviously or exclude it to reduce noise in the changelog 🤷 .

conda_build/metadata.py Outdated Show resolved Hide resolved
conda_build/variants.py Outdated Show resolved Hide resolved
@@ -1665,7 +1666,6 @@ def build_id(self):
raise RuntimeError(
f"Couldn't extract raw recipe text for {self.name()} output"
)
raw_recipe_text = self.extract_package_and_build_text()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how much of a speedup removing this gives us (since both of us did this)

Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
@mbargull mbargull force-pushed the render-speedups-func-calls branch from f208ed3 to 2a8ddb2 Compare March 25, 2024 18:49
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
@kenodegard
Copy link
Contributor

Per #5253 (comment) I've split this into even smaller PRs

Closing in favor of #5278, #5279, #5280, #5281, #5283

@kenodegard kenodegard closed this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants