Re: Outline feature in validator (was: profiling the Markup Validator with Devel::NYTProf)

On Mon, Apr 07, 2008, Dominique Hazael-Massieux wrote:
> Well, if the cost of using a single handler is so high, I would
> definitely recommend defining several handler modules; I expect one can
> inherit from another, and thus, there wouldn't be any code duplication,
> right?

I followed this path and came up with a patch for check today. Took the
opportunity to clean up the pseudo-modular structure of that script a
bit, renamed the ill-named "SAXHandler" and subclassed it for the (rare)
cases where the outline is needed.

http://lists.w3.org/Archives/Public/www-validator-cvs/2008Apr/0048.html
http://dev.w3.org/cvsweb/validator/httpd/cgi-bin/check.diff?r1=1.583&r2=1.584&f=h

I tested and it seems to work, I ran the profiling and saw the obvious
jump in performance I was expecting. My perl-fu feels a tad rusty these
days however, so a review of the patch would be more than welcome.

Thanks,
-- 
olivier

Received on Wednesday, 23 April 2008 04:30:07 UTC