Re: Slowdown when calling a plugin from within a loop
Posted by Eric Olson-3 on
URL: http://imagej.273.s1.nabble.com/Slowdown-when-calling-a-plugin-from-within-a-loop-tp3696849p3696851.html
Jeffrey B. Woodward said the following on 3/7/2008 6:58 PM:
> I would have to guess that the DM3_Reader class has a "memory leak"
> [of sorts] (I am not familiar with that class, but have you verified
> that there isn't a method to call to indicate that you are done with a
> file prior to "run"ning the next file). I suspect that if you monitor
> the memory usage of your system that you will find that you have
> exhausted a lot of memory and the system is having to page/swap memory
> to and from disk.
That was my first thought, but the Windows Task Manager showed no
increase in the amount of memory used (and I was loading >100 MB of
images total) and there was not a lot of disk activity, which I always
see when it's swapping to/from disk. There isn't any method in the
plugin like the one you described.
I thought maybe since I was calling the plugin repeatedly, the garbage
collector just wasn't getting around to releasing some used objects, so
I tried adding a System.gc() call at the end of each loop of my plugin,
but that didn't help.
-- Eric