Re: Maximum Likelihood processing time [message #38421] |
Tue, 09 March 2004 08:39  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
Lorenzo Busetto wrote:
> Hi all,
>
> I need to evaluate the variation in the processing time required to
> perform a maximum likelihood classification with a variable number of
> input bands, so I'm using the ENVI built-in functions "envi stats
> doit" (in order to compute ROI statistics) and "class_doit" (in order
> to classify the image).
>
> My problem is that when I perform the classification for the first
> time I have a high processing time (i.e. 60 seconds), but if I perform
> the same classification a second time, the time required for the
> process is much lower (i.e. 10 seconds). I tried to reset the idl
> session (with the .FULL_RESET_SESSION command), and also to quit and
> restart idl and perform again the classification, but after the first
> classification the time required for the process remains low. The only
> way to have a comparable processing time is to restart my pc.
> This also happens if I increase the number of input bands used: If I
> make a classification with 10 bands, I have a high processing time,
> but if I first make a classification with 5 bands and then a
> classification with 10 bands, the time required for the 10 bands
> classification is lower.
>
> Does anybody know why it happens ? Is IDL (or ENVI) "storing"
> somewhere the informations on previous calculations ?
>
> I don't want to have to restart my computer every time I change the
> number of bands in order to get comparable processing times....
>
Hello,
I think what you are seeing is that when a routine is first called, IDL
has to search for it and (possibly) compile it. Subsequent calls don't
have to be compiled.
You could compile the routines before running the routine (see .compile)
or you could perform your comparisons only after the routine has been
called at least once.
Ben
|
|
|
Re: Maximum Likelihood processing time [message #38507 is a reply to message #38421] |
Wed, 10 March 2004 02:28  |
lbusett
Messages: 9 Registered: March 2004
|
Junior Member |
|
|
> Hello,
>
> I think what you are seeing is that when a routine is first called, IDL
> has to search for it and (possibly) compile it. Subsequent calls don't
> have to be compiled.
>
> You could compile the routines before running the routine (see .compile)
> or you could perform your comparisons only after the routine has been
> called at least once.
>
> Ben
Hi Ben,
thanks for your answer. Unfortunately, I dont' think that this is
the (only) problem. I'll try to explain what happens with an example:
- I run the classification for the first time with 5 bands, and I get
a processing time of 12 seconds. Now, all the routines have been
compiled, and, if your suggestion is correct, the processing time
should be constant for further classifications, but I noticed the
following problem:
- If, after the first 5 bands classification, I run a 50 bands
classification, the processing time is about 300 seconds.
- If, after the 5 bands classification, I run an intermediate 45
bands classification (which takes about 275 seconds), and then a 50
bands classification, the time required for the 50 bands
classification decreases to about 85 seconds !
- If now I quit IDL, restart it, and perform again the 50 bands
classification, I get a processing time of 15 seconds !
Now, I think that this behaviour could be related to a "memory
allocation" problem, but I don't know how to manage it.
Does anyone have a suggestion ?
Thanks for the help,
Lorenzo
|
|
|