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 get_formatted_array #231

Merged
merged 6 commits into from
May 14, 2019
Merged

Conversation

brynpickering
Copy link
Member

@brynpickering brynpickering commented May 7, 2019

Fixes issue(s) #170

Summary of changes in this pull request:

  • No converting DataArrays to pandas to undertake string splitting.
  • Dimensions are reorganised alphabetically (except timesteps is always last) having formatted the array.
  • Added tests.
  • Cleaned up some tests which were unnecessarily converting DataArray to Pandas to check results.

Reviewer checklist:

  • Test(s) added to cover contribution
    - [ ] Documentation updated
  • Changelog updated
  • Coverage maintained or improved

@brynpickering brynpickering requested a review from sjpfenninger May 7, 2019 11:36
@brynpickering brynpickering changed the title Speed up get_formatted_array; add and cleanup tests Speed up get_formatted_array May 7, 2019
@coveralls
Copy link

coveralls commented May 7, 2019

Coverage Status

Coverage increased (+0.1%) to 94.153% when pulling f30ac7f on fix_slow_get_formatted_array into 04f281c on master.

@timtroendle
Copy link
Member

timtroendle commented May 13, 2019

To add some measurements: in one sample this reduced max memory on Euler for my European model from 250 GB to 200 GB and postprocessing runtime from > 3h to ridiculous 62 seconds.

The job is a simple calliope run ....

@brynpickering
Copy link
Member Author

To add some measurements: in one sample this reduced max memory on Euler for my European model from 250 GB to 200 GB and postprocessing runtime from > 3h to ridiculous 62 seconds.

The job is a simple calliope run ....

👍 A pity that it doesn't seem to improve the time it takes our tests to run...

Copy link
Member

@sjpfenninger sjpfenninger left a comment

Choose a reason for hiding this comment

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

Looks good!

@sjpfenninger sjpfenninger merged commit c383181 into master May 14, 2019
@sjpfenninger sjpfenninger deleted the fix_slow_get_formatted_array branch May 14, 2019 14:58
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.

5 participants