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
Drops in playback performance when loading napari-TSP #25
Comments
I think I can explain the hit to performance. Every time the slice changes a new draw event is triggered, as the plugin draws the current z slice. The current implementation of the draw function is relatively performance heavy as the whole canvas is cleared and redrawn. Matplotlib is not perfect for such an application. I already have an improved version of the drawing machinery but it will still be somewhat resource heavy when combining it with the playback function. In the current version the data acquisition and the drawing is one function, in the new version they are separate. This might help. I might have some time this week and will run some tests with the new functions. Thanks for reporting. :) |
thanks for the fast reply!
on this, I don't know if this tips mentioned here by Juan-Nunez might be of interest. I was also thinking on using/implemented some other recommendations from the Napari documentation such as multithreading those task that are computational consuming and are independent of the main thread e.g average a ROI. Do you think that that make sense? Anyway, from now that's all. I look forward to see your results and check out the version you are working on. Cheers Ruben |
@rjlopez2 I can reproduce your observations. The fps drop if the plugin is docked, it is not necessary to select a layer and actually plot. I think I have to review which event triggers the plotting. Seems like it causes redraws in situations when it shouldn't. Thanks for the pointer to Juan-Nunez's post, that's exactly the thing I try in the new implementation.
It's somewhat tricky to keep track with as small an overhead as possible, but I think it will work. |
Hi @rjlopez2 , |
Thanks @Chris-N-K! |
Hi Chris,
I have seen a slightly decrease in performance for rendering some relatively modest size timestacks in napari when using your pluging.
I have been thinking for some time now how to address this problem but may be you could give me a better insight on this and may be take me to the right track on how to fix this.
Here is a way to reproduce the issue:
Load your plugin
See the increased latency in the playback of the current image
close your plugin
playback speed comes back to normal
Do you have an idea what could be the reason of this drops in performance when I load your plugin?
best
Ruben
The text was updated successfully, but these errors were encountered: