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
Return early when no slicing needed #5239
Merged
andy-sweet
merged 1 commit into
napari:main
from
andy-sweet:fix-5194-early-return-slice
Oct 19, 2022
Merged
Return early when no slicing needed #5239
andy-sweet
merged 1 commit into
napari:main
from
andy-sweet:fix-5194-early-return-slice
Oct 19, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #5239 +/- ##
==========================================
+ Coverage 88.74% 88.79% +0.04%
==========================================
Files 574 574
Lines 48954 48956 +2
==========================================
+ Hits 43446 43472 +26
+ Misses 5508 5484 -24
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Czaki
approved these changes
Oct 17, 2022
jni
approved these changes
Oct 18, 2022
Nice fix! :) |
Czaki
pushed a commit
that referenced
this pull request
Jun 18, 2023
Czaki
pushed a commit
that referenced
this pull request
Jun 19, 2023
Czaki
pushed a commit
that referenced
this pull request
Jun 21, 2023
Czaki
pushed a commit
that referenced
this pull request
Jun 21, 2023
Czaki
pushed a commit
that referenced
this pull request
Jun 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes the slicing performance issues detected in #5194. These were caused by the refactor in #5003, which removed the case where we return early in
Layer._slice_indices
when no slicing is actually needed.Type of change
References
Closes #5194
How has this been tested?
I ran some of the slicing benchmarks affected by this in #5194 at a few different commits.
First, at the commit on
main
corresponding to #5003 (2566980).Then at the previous commit (e6ab7cd) to show the regression.
Then with this PR, to show the fix.
Final checklist:
trans.
to make them localizable.For more information see our translations guide.