-
Notifications
You must be signed in to change notification settings - Fork 21
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
[WIP] fix: fix lag in live mode after mda acquisition #309
Conversation
@@ -32,42 +35,46 @@ def __init__( | |||
self._mda_handler = _NapariMDAHandler(self._mmc, viewer) | |||
self._live_timer_id: int | None = None | |||
|
|||
self.streaming_timer = QTimer(parent=self) |
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'm curious if you determined that using an independent QTimer
instead of self.startTimer
was sufficient to resolve the slow down? I ask because this is a bit surprising to me. Before accepting this change, I'd prefer to know why it matters. Looking into the Qt docs for hints if need be. If true, it might have to do with threading or something... but lets figure out why we're doing it
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #309 +/- ##
=======================================
Coverage 78.92% 78.93%
=======================================
Files 15 15
Lines 688 693 +5
=======================================
+ Hits 543 547 +4
- Misses 145 146 +1 ☔ View full report in Codecov by Sentry. |
I think that ultimately, the problem here is the So I think this can be closed. |
I've noticed that after opening
napari-micromanager
thelive mode
works well without any lag. However, after running a MDA acquisition, thelive mode
starts to lag. See video below to see this behavior.As a proposed solution, I modified the
CoreViewerLink
class and use the sameQTimer
pattern that we use in thepymmcore-widgets
ImagePreview
widget (https://github.com/pymmcore-plus/pymmcore-widgets/blob/d5d38c9cc24bc2ac99b5921ac2593a4037d258fb/src/pymmcore_widgets/_image_widget.py#L18).CURRENT
current.mp4
FIX
fix.mp4