Slow start to large MDAs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Slow start to large MDAs

Daniel Dickinson
Using MicroManager 2.0g, we've noticed that a large time series (7,000 frames) takes a very long time to start acquiring when run from the MDA window.  When we click Acquire, the image window appears but the illumination shutter does not open.  After >1 minute, the shutter opens and the image sequence is acquired normally.  A single snap is essentially instantaneous, and stacks of 70 or 700 frames start without a noticeable delay.  Based on this, my hunch is that MM is struggling to pre-allocate memory for the large stack, but I don't know enough of the details of how the MDA code works to try to troubleshoot. This behavior was first observed with a Nov. 2019 build but we upgraded to the Feb. 20 nightly build and it didn't change anything.  Thanks for any suggestions. 

Dan Dickinson 
UT Austin


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Slow start to large MDAs

Nico Stuurman-2
Hi Dan,

On 2/21/2020 1:02 PM, Daniel Dickinson wrote:
Using MicroManager 2.0g, we've noticed that a large time series (7,000 frames) takes a very long time to start acquiring when run from the MDA window.  When we click Acquire, the image window appears but the illumination shutter does not open.  After >1 minute, the shutter opens and the image sequence is acquired normally.  A single snap is essentially instantaneous, and stacks of 70 or 700 frames start without a noticeable delay.  Based on this, my hunch is that MM is struggling to pre-allocate memory for the large stack, but I don't know enough of the details of how the MDA code works to try to troubleshoot. This behavior was first observed with a Nov. 2019 build but we upgraded to the Feb. 20 nightly build and it didn't change anything.  Thanks for any suggestions.

Just tried to reproduce this using the Demo equipment, but did not get a delay as you describe.  There is a delay when using a circular buffer with a large size for the first time.  For instance, after setting a very large circular buffer (Tools > Options), the first time you run live mode (or start an MDA), you will notice a delay (apparently caused by allocating memory).  The second time you run live, there is no delay (as the buffer is re-used).  Your case seems different.  It could help to have a look at the Trouble Report (would be great if you can send one).  Also, if this behavior was not there in builds earlier than Nov. 2019, it would be great if you could pinpoint when the behavior started.

Best,


Nico




_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Slow start to large MDAs

Daniel Dickinson
We've found a solution to this and I wanted to share with the list.  The delay occurs whenever the timelapse interval and exposure are set to the same value.  The mistake we made was to set both the interval and exposure to 50 ms.  If we change the interval to 0, we get no delay starting the acquisition (and the end result is the same - continuous streaming acquisition). If we leave the interval at 50 ms but change the exposure to 10 ms, we also get no delay.  Setting the interval to 100 ms with an exposure of 50 ms was also fine. 

This is a rather strange behavior - I don’t understand why the acquisition engine has trouble dealing with an exposure and interval that match, or why the delay should be dependent on the number of frames to acquire.  Nevertheless, we can avoid issues with our experiment by choosing the settings correctly (interval should be set to 0 for continuous acquisition). 

Best, 
Dan 


From: Stuurman, Nico <[hidden email]>
Sent: Saturday, February 22, 2020 12:27 PM
To: Micro-Manager General <[hidden email]>
Subject: Re: [micro-manager-general] Slow start to large MDAs
 
Hi Dan,

On 2/21/2020 1:02 PM, Daniel Dickinson wrote:
Using MicroManager 2.0g, we've noticed that a large time series (7,000 frames) takes a very long time to start acquiring when run from the MDA window.  When we click Acquire, the image window appears but the illumination shutter does not open.  After >1 minute, the shutter opens and the image sequence is acquired normally.  A single snap is essentially instantaneous, and stacks of 70 or 700 frames start without a noticeable delay.  Based on this, my hunch is that MM is struggling to pre-allocate memory for the large stack, but I don't know enough of the details of how the MDA code works to try to troubleshoot. This behavior was first observed with a Nov. 2019 build but we upgraded to the Feb. 20 nightly build and it didn't change anything.  Thanks for any suggestions.

Just tried to reproduce this using the Demo equipment, but did not get a delay as you describe.  There is a delay when using a circular buffer with a large size for the first time.  For instance, after setting a very large circular buffer (Tools > Options), the first time you run live mode (or start an MDA), you will notice a delay (apparently caused by allocating memory).  The second time you run live, there is no delay (as the buffer is re-used).  Your case seems different.  It could help to have a look at the Trouble Report (would be great if you can send one).  Also, if this behavior was not there in builds earlier than Nov. 2019, it would be great if you could pinpoint when the behavior started.

Best,


Nico




_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general