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 Herbie.xarray by Reusing local_file #46

Merged
merged 3 commits into from
Feb 17, 2022

Conversation

WToma
Copy link
Contributor

@WToma WToma commented Feb 15, 2022

Doing a quick profiling, get_localFilePath was taking up the majority of time of a call to xarray, so reusing the computed value speeds up the function quite a bit. If you think this approach is reasonable, another improvement might even be passing the computed index and local_file to download, so that it doesn't need to recompute these either.

@blaylockbk blaylockbk merged commit 1573f76 into blaylockbk:master Feb 17, 2022
@blaylockbk
Copy link
Owner

Thanks for finding this! Definitely is an improvement. Yes, there are more obvious improvments that could help Herbie run faster. I'll look at using the local_file in download. And thanks for giving back to Herbie! I hope it has been useful to you.

@WToma
Copy link
Contributor Author

WToma commented Feb 17, 2022

It was! Thanks for making it public!

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.

None yet

2 participants