Hi Bruce,
It recently came to my attention that using functions serverely
impacts script performance.
Try this. This is short and fast, but the difference between using
functions and not using them was over a minute for a real script. Any
idea why?
Regards,
Sheri
win.debug("screen")
win.debugshow("")
local start=perfcount
for (local i=0;i<100;i++)
win.debug("hello")
endfor
test1=scriptname++" elapsed time:
"++((perfcount-start.tofloat)/perffreq).format
start=perfcount
for (local i=0;i<100;i++)
testfunction("hello")
endfor
test2=scriptname++" elapsed time:
"++((perfcount-start.tofloat)/perffreq).format
win.debug("elapsed time NO function:"++test1)
win.debug("elapsed time ONE function:"++test2)
quit
Function testfunction(sLine)
win.debug(sLine)
quit