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 CollateProducts by avoiding redistribute when possible. #191

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

ljgray
Copy link
Contributor

@ljgray ljgray commented Aug 26, 2022

The call to redistribute is only needed if the frequency axis has to be reordered. In many cases this doesn't have to happen, so we can do the task while distributed across frequency, avoiding an expensive redistribute call. This checks to see if the frequency mapping is sorted, and if it is it does not redistribute. Without redistributing, the task takes 70-80s total in the daily pipeline, down from around 2500s when redistributing every time.

@ljgray ljgray changed the title Speed up CollateProducts by avoiding redistrubute when possible. Speed up CollateProducts by avoiding redistribute when possible. Aug 26, 2022
@ljgray ljgray requested a review from jrs65 August 26, 2022 19:03
draco/analysis/transform.py Outdated Show resolved Hide resolved
@ljgray
Copy link
Contributor Author

ljgray commented Sep 6, 2022

@jrs65 Improved the test for frequency mapping, this should be good to merge now

In many cases, the frequecy mapping does not reorder the frequency axis
at all, and there is no need to redistribute away from the frequency
axis. The redistribute call is expensive, so we avoid it when possible.
@ljgray ljgray merged commit 78f6c14 into master Sep 7, 2022
@ljgray ljgray deleted the ljg/collate-products-va branch September 7, 2022 19:22
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.

2 participants