--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
>
> >  This sounded great so I loaded the new version right
> > away. I have a button that runs a script that
> > dynamically generates the menu shown using cl commands.
> > It has always been a bit slow for the menu to appear;
> > could previously count to 2 before seeing it.
> > Unfortunately with 4.7c I can now count to 10 before
> > seeing it. 

> 
> I cannot explain this.  
> I tried the following script, which creates and re-creates a menu 
> using cl in a loop (just to increase increase time taken so that 
> measurements are significant).  I tried it in four cases:
> no exec.setautominmemory to get default behaviour of once per 
> second, 
> (0,-1,-1) which means no minimization at all, 
> (1, -1, -1)  same as default
> (-1,-1,-1)  minimize with each command
> 
> the results were
> about 1.16 second for all cases except (-1,-1, -1), which yielded 
> 4.26 seconds.
> 
> The script was
> 
> local start=perfcount
> exec.setautominmemory(1,-1,-1)  //omit for first run
> for (local i=0; i<=100; i++)
> local hcl=cl.create("dynamenu",1)
> for (local j=0;j<50; j++)
> local hitem = hcl.insert(0)
> hitem.setlabel("test item "++j)
> hitem.addleft("win.debug(\"show item "++j++"\")")
> endfor
> endfor
> win.debug(((perfcount-start.tofloat)/perffreq).format)
> hcl.showmenu
>

Hi Bruce, if exec.setautominmemory(1,-1,-1) is the same as the
default, why would the performance vary if omitted on the first run?

Am I correct in assuming that if exec.setautominmemory gets set by way
of a script, it will remain in effect for all of PowerPro until/unless
exec.setautominmemory is run again?

I have reinstalled 4.7c. Currently can count to 3 on my own menu (I
need to add some perfcounting to my script for more precise
measurements), and it doesn't vary much from 3 regardless of the
exec.setautomemory in effect (assuming previous paragraph is correct,
because my exec is being run from a separate script). I don't know
what has changed since yesterday, maybe has something to do with
current cpu load? Yesterday it was consistently much slower showing my
menu with 4.7c than 4.7b. Today its only a little slower.

Another point is that my dynamic menu generation does have file i/o if
the exename of the window under the triggering caption button has
changed. The source menu Command List is in my pcf. Script deletes all
entries between two ids in the Command List (if a new exename), then
generates a few entries based on the exename, then parses the
exename's filemenu and generates a menu entry for each entry. All the
generated entries go between the original Command List's id markers.

Regards,
Sheri

Reply via email to