[tclwebtest] Re: tclwebtest slowness
Status: Abandoned
Brought to you by:
tils
From: Tilmann S. <ti...@ti...> - 2003-10-22 14:44:42
|
[replying to the tclwebtest list where this belongs to] * Peter Marklund <pet...@fa...> [20031022 13:01]: > Turns out there is a bit of a slowness problem with Tclwebtest on the > /acs-lang page. Why? Maybe because of a huge select box with timezones. > Below is a snippet of debug printouts. The parse_caption_before <number> > statements pop out *really* slow, as in once a second or so. Do you have > any idea why this is so? > > I've tracked down that it's when I invoke form find on the page that the > slowness begins. > > Please find attached the acs-lang index page. > > following a redirect to: > http://dotlrn20-pg-test.collaboraid.net/acs-lang/ [...] I don't have an answer for this specific problem, just the general observation that the way tclwebtest parses html is bound to be slow and potentially very slow with big pages or unexpected html structures. I did some experiments with the html parsing mode of tdom and some other html parsing library which was written in tcl but found both not sufficient for various reasons. The main problem with tdom remains (last tested version 0.7.7) that it is not forgiving enough for malformed html. Last time I tested against openacs html it borked on the site-map, on some pages in bug-tracker and propably on some parts of the standard form templates as well. Of course changing to a more strict html parsing mode would produce a stronger motivation to fix those very broken html pages, which would be good for openacs, but would narrow the usability of tclwebtest. Also tdom would add an installation requirement. I'd rather use an html parsing library that is almost as lenient as tclwebtest is right now, but I didn't find it yet. That all said, it might well be that the specific slowness you are talking about can be fixed by tweaking some regexes, but I don't have time to look into it right now. cheers, til -- http://tsinger.com |