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 get_subsets performance for single subset case #3363

Merged
merged 7 commits into from
Dec 17, 2024

Conversation

rosteen
Copy link
Collaborator

@rosteen rosteen commented Dec 17, 2024

As previously noted in the deleted comment, there's no need to process every subset if only one subset was requested. This trims the list down to only the matching subset before going through the loop processing them all.

@rosteen rosteen added the performance Performance related label Dec 17, 2024
@rosteen rosteen added this to the 4.1 milestone Dec 17, 2024
jdaviz/app.py Outdated Show resolved Hide resolved
jdaviz/app.py Outdated Show resolved Hide resolved
jdaviz/app.py Outdated Show resolved Hide resolved
Co-authored-by: P. L. Lim <[email protected]>
jdaviz/app.py Show resolved Hide resolved
jdaviz/app.py Outdated Show resolved Hide resolved
Co-authored-by: P. L. Lim <[email protected]>
Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Code looks like code. Thanks!

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.76%. Comparing base (629fa62) to head (9999179).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
jdaviz/app.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3363      +/-   ##
==========================================
- Coverage   88.77%   88.76%   -0.01%     
==========================================
  Files         125      125              
  Lines       19227    19231       +4     
==========================================
+ Hits        17068    17071       +3     
- Misses       2159     2160       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@javerbukh javerbukh left a comment

Choose a reason for hiding this comment

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

Yup, definitely code. LGTM!

@rosteen rosteen merged commit 297f8db into spacetelescope:main Dec 17, 2024
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants