[html5] Incremental rendering of XHTML5

Ian Hickson ian at hixie.ch
Thu Aug 11 13:11:48 PDT 2011


On Thu, 11 Aug 2011, Jesper Tverskov wrote:
> 
> Here are my questions. What is known about the difference in speed 
> between XML parsing and HTML parsing of webpages?
> 
> 1. In theory an XML parser ought to be faster, being less complex than 
> an HTML parser.

Actually the complexity isn't different in a way that should particularly 
impact the performance.


> 2. If an HTML5 page is optimized for small size avoiding end tags for 
> "p" elements, etc., it probably has a marginal speed advantage that 
> might make up for the slower parsing?

It will transfer faster, and will be processed faster since there are 
fewer bytes to process.


> 3. It could also be true that you get the fastest HTML parsing if the 
> markup is as well-formed as possible?

There are some classes of conformance errors that negatively impact 
performance, yes (especially mis-nested tags when the "formatting 
elements" are involved).


> 4. Since we have extremely fast incremental rendering both for XHTML5 
> and HTML5, file size doesn't matter much in a modern browser?

Smaller files will be quicker. How much it matters to you depends on your 
performance goals.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the Help mailing list