The problem turned out to be a few inefficient loops with regular expressions, which seem to have at least a quadratic behavior depending on the size of the analyzed web-page. This was especially bad on assessment.
i made a couple of changes to tclwebtest, which still passes the regression test and is on its regression test more than 6 times faster on user time:
before: 4.647u 0.310s 0:05.40 91.6% 0+0k 0+0io 0pf+0w
after: 0.696u 0.230s 0:01.15 80.0% 0+0k 0+4io 0pf+0w
The new version is on a few examples from assessment more than 60 (!) times faster (wall clock time) than before. One can get the version form here:
http://media.wu-wien.ac.at/download/tclwebtest.tcl
I have sent a separate mail to tilman singer, who is the main developer of tclwebtest. hopefully, he can incoportate these changes in future versions.
Åsmund has written a very nice recorder for tclwebtest as a firefox plugin (XUL application). the recorder allows to create tclwebtest files from a user session by clicking on links and filling out forms etc. The tclwebtest files can be nicely run in threads with openacs, which is nice for regression testing (no issues with missing ad_conn infos). If there is enough interest, we might be able to make this available.