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
Disable buffer swapping #5741
Disable buffer swapping #5741
Conversation
Could we control this using environment variable? |
Codecov Report
@@ Coverage Diff @@
## main #5741 +/- ##
==========================================
- Coverage 89.83% 88.39% -1.45%
==========================================
Files 608 608
Lines 51881 51882 +1
==========================================
- Hits 46608 45861 -747
- Misses 5273 6021 +748
... and 39 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I would make it disabled by default in that case, though. Can you point me to where the env variable stuff is normally set? |
The user could set it in his .bashrc, .zshrc .profile, etc |
I meant where in the napari code we read all the env variables and store them for later usage in the code :P Or would you just read it when the canvas is created? |
I do not know the such place. I prefer using it when creating Canvas. It is rare enough for me not to think about performance. |
Something like this? I suppose this should be somewhere in the docs as well. |
Yes. This needs to be added to docs. |
I see some mentions of environment variable regarding rendering in |
I prefer to have a single place with list of all Environment variables use by napari. Best, next to settings. |
Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
for more information, see https://pre-commit.ci
I think this section is prolly the best? But I think the whole thing at some point needs to be rewritten—I think it's mostly autogenerated? |
I moved it to the experimental settings. Now it works both from there and as a env variable! |
Yep, so this should get added automatically now that it's a preference. Maybe experimental is not quite the right place (advanced? :P) but for now I think it works. |
I've tested it, works great for me, @brisvag thank you for the fix! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see any performance difference nor any visual effect, but I like the implementation.
I wonder whether it should be true or false by default, given that the existing behavior is true.
My reasoning was: it's more likely that a new user affected by the bug will simply think "oh well napari has terrible performance, bye" rather than opening an issue or testing experimental settings. And the cost seems basically zero otherwise 🤷 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on False
as the new default - if we get reports of tearing we can reevaluate
# Fixes/Closes Closes #5734. # Description This change drastically improves performance on some hardware by sacrificing some quality (tearing is more likely). However, several people tested it and didn't notice any appreciable degradation of the rendering, so it seems like a worthwile exchange. See #5734 for more details. We might be able to fix this on the vispy side, but for now this works well on the napari side. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update cc @ksofiyuk --------- Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
# Fixes/Closes Closes #5734. # Description This change drastically improves performance on some hardware by sacrificing some quality (tearing is more likely). However, several people tested it and didn't notice any appreciable degradation of the rendering, so it seems like a worthwile exchange. See #5734 for more details. We might be able to fix this on the vispy side, but for now this works well on the napari side. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update cc @ksofiyuk --------- Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
# Fixes/Closes Closes #5734. # Description This change drastically improves performance on some hardware by sacrificing some quality (tearing is more likely). However, several people tested it and didn't notice any appreciable degradation of the rendering, so it seems like a worthwile exchange. See #5734 for more details. We might be able to fix this on the vispy side, but for now this works well on the napari side. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update cc @ksofiyuk --------- Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
# Fixes/Closes Closes #5734. # Description This change drastically improves performance on some hardware by sacrificing some quality (tearing is more likely). However, several people tested it and didn't notice any appreciable degradation of the rendering, so it seems like a worthwile exchange. See #5734 for more details. We might be able to fix this on the vispy side, but for now this works well on the napari side. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug-fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update cc @ksofiyuk --------- Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Fixes/Closes
Closes #5734.
Description
This change drastically improves performance on some hardware by sacrificing some quality (tearing is more likely). However, several people tested it and didn't notice any appreciable degradation of the rendering, so it seems like a worthwile exchange. See #5734 for more details.
We might be able to fix this on the vispy side, but for now this works well on the napari side.
Type of change
cc @ksofiyuk