Forum OpenACS Q&A: Re: How do I speedup tclwebtest ?

Collapse
Posted by Michael Schlenker on
I used tclwebtest to create tests for a different beast and have found it quite slow too.

I'm not sure why its slow, but going over the code i found many small nits and things where regexps were used when string commands would be better.

I'm not sure how good the regexp's are reused/cached in tclwebtest, its a while since i looked at the code.

The Tcl regexp engine caches the last 30 compiled regexps and any regexps stored in variables (Tcl_Obj's)..., so if there are more than 30 regexps in use in a given piece of code and those are not stored in vars, they will force recompiles. Some kinds of regexps are very expensive to compile/use, and often can be optimzed to more efficient versions.

You could use the profiler package from tcllib to profile tclwebtest and see where all the time is wasted.