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

Improve performance of VaryingCelestialTransform #370

Merged
merged 13 commits into from
May 17, 2024

Conversation

SolarDrew
Copy link
Contributor

Slightly re-jig VaryingCelestialTransform to strip units from the inputs in ._map_transform() and then put them back afterwards. Gives a reasonable performance boost, about 3.5x faster to plot a dataset across non-optimal axes.

@Cadair Cadair changed the title More refactoring in VaryingCelestialTransform Improve performance of VaryingCelestialTransform May 8, 2024
Copy link

codspeed-hq bot commented May 9, 2024

CodSpeed Performance Report

Merging #370 will improve performances by ×2.9

Comparing SolarDrew:new-profiling (b55858d) with main (6f7ce1e)

Summary

⚡ 2 improvements
✅ 1 untouched benchmarks

Benchmarks breakdown

Benchmark main SolarDrew:new-profiling Change
test_pixel_to_world 2,694.8 ms 938.9 ms ×2.9
test_plot_dataset[axes0] 44.3 s 27.7 s +59.76%

@SolarDrew
Copy link
Contributor Author

Merging #370 will not alter performance

WHAT

THAT WAS NOT THE EFFING POINT 🤦

@Cadair
Copy link
Member

Cadair commented May 9, 2024

hahaha

@SolarDrew
Copy link
Contributor Author

Merging #370 will improve performances by ×2.9

Ok that's much closer to what I expected. I declare this PR ready for review

Copy link
Member

@Cadair Cadair left a comment

Choose a reason for hiding this comment

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

:shipit:

@Cadair Cadair merged commit fdcf97d into DKISTDC:main May 17, 2024
19 of 20 checks passed
SolarDrew added a commit to SolarDrew/dkist that referenced this pull request May 17, 2024
@SolarDrew SolarDrew mentioned this pull request May 17, 2024
Cadair pushed a commit to SolarDrew/dkist that referenced this pull request Jul 11, 2024
Cadair pushed a commit to SolarDrew/dkist that referenced this pull request Jul 17, 2024
Cadair added a commit that referenced this pull request Jul 18, 2024
* Try slower plot again to see how it does now with performance
improvements from #370

* Don't need both fixtures in this test any more

* Don't need this old stuff either

* Use more points for pixel_to_world benchmark

* Add some more benchmarks

* Need units on parameters for updating vct some of the time

Not sure how this snuck past the tests in the first place

* Benchmarks are taking too long again

* Nope too slow

* Benchmark dataset slicing

* Add changelog

* Try slower plot again to see how it does now with performance
improvements from #370

* Don't need both fixtures in this test any more

* Don't need this old stuff either

* Use more points for pixel_to_world benchmark

* Add some more benchmarks

* Need units on parameters for updating vct some of the time

Not sure how this snuck past the tests in the first place

* Benchmarks are taking too long again

* Nope too slow

* Benchmark dataset slicing

* Add changelog

* Update dkist/wcs/models.py

Co-authored-by: Stuart Mumford <[email protected]>

* Add tests to hit update_celestial_transform and make sure the units are
working sensibly

* Correct test comparison value

---------

Co-authored-by: Stuart Mumford <[email protected]>
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