--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], "Sheri" <sherip99@> wrote:
> >
> > Hi Bruce,
> > 
> > It recently came to my attention that using functions serverely
> > impacts script performance.
> >
> 
> Each time you call the function, PowerPro opens a new file handle and 
> scan the whole file for the function you called.
> 
>  There are some possible speed-ups, like putting
> functions at the beginning of the file or putting them
> into command lists and calling with run., but, in the
> end, PowerPro is not the scripting language to use if
> performance becomes an issue.
>

Hi Bruce,

The script in question is the test script for the upcoming regex
plugin. It had gone from a high of 120 seconds down to 20 seconds by
eliminating most function calls. With your added hint of moving
functions to the top of the script, its now running in just over 6
seconds. It seems miraculous!

Too bad functions have so much overhead. Seems like their positions in
the script is not changing and could be reaccessed. One of the new
plugin services can make a vector of where all the Function statements
are. Such a vector could be searched for the needed function name and
the next entry would give the offset position in the script.

Regards,
Sheri

Reply via email to