W3C home > Mailing lists > Public > public-qa-dev@w3.org > April 2008

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

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Mon, 07 Apr 2008 08:56:37 +0200
To: olivier Thereaux <ot@w3.org>
Cc: public-qa-dev hacking list <public-qa-dev@w3.org>
Message-Id: <1207551397.5148.307.camel@localhost>

Le vendredi 04 avril 2008 à 16:47 -0400, olivier Thereaux a écrit :
> if ($self->{am_in_heading}==1){
> ... in sub W3C::Validator::SAXHandler::data()
> Of course the line itself is not time-consuming, but its being called  
> 1.2 million times (once per character) is really heavy.

(probably not once per character, except in worse case scenarii; in
general, while there is no guarantee that characters be all stuck
together in the data call in the SAX API, it doesn't imply that each
character generates such a call either)

> I'm wondering if it would be possible to make that one line faster.
> 
> But if not, I think we need to reconsider the benefit of the "show  
> outline" feature. That feature is the only reason why we have sub  
> W3C::Validator::SAXHandler::data() at this point.

Err... Is this API call done even when the show outline option isn't
enabled? If so, the best solution might be to make sure it isn't called
unless it is enabled, no?

Dom
Received on Monday, 7 April 2008 06:58:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 19 August 2010 18:12:49 GMT