Re: Slowdown when creating/destroying Object Graphics components [message #47406] |
Thu, 09 February 2006 08:58 |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
On Wed, 08 Feb 2006 12:14:12 -0800, David Watson wrote:
> I'm working on a program that creates/destroys a large number of ROIs,
> and noticed a slowdown after it has been running for certain amount of
> time. I was able to boil it down to this simple test program, which
> illustrates the problem perfectly.
>
> On my machine, under both linux and windows, IDL 6.1 and 6.2, this
> slowdown is clearly indicated - the first loop takes about 4 seconds,
> gradually increasing each time through. After about 10-20 iterations,
> it is taking upwards of 10 seconds per loop.
<snip>
The slowdown problem is fixed in IDL 6.3. There's another related memory
leak problem that I will try to fix before 6.3 goes out. To get around
that, you should probably "reuse" the roi objects instead of destroying
and recreating them. It's probably actually easier, better "form", and
more efficient to reuse them anyway, even in the absence of bugs related
to destroying and recreating them.
Karl
|
|
|