Incremental rendering in CSS (Was: DTP with XHTML+CSS)

David Woolley wrote:

>Columns do cause a problem for progressive rendering, and, although
>parts of the CSS3 Box Model draft say that progressive rendering
>is a desirable attribute, it might be better to say that documents
>that cannot be incrementally rendered cause problems for the viewer
>(either rendering delays - a real problem with many table based layouts,
>or movements to fix-up the layout).
>
Sometime, I would still want to create an XML+CSS renderer for... my old 
MSX computer! For that however, reflows are a no-no, it is way too slow 
for that. The idea was to not support anything that potentially requires 
a reflow. This would include e.g. the following selectors and properties:

:hover, :last-child, :nth-last-child(), background-attachment, position: 
fixed, table-layout: auto, etc.

There are already some profiles, e.g. the mobile profile, but they are 
too restrictive in my opinion, after all, why not support elem[foo], or 
xx + yy? Those actions can perfectly well be executed in O(1) time.

It would be nice if a kind of ‘incremental rendering profile’ or 
something could be defined. Or at least a list of selectors and 
properties which affect incremental rendering and cause reflows. This 
would also help in getting an overview of how much of CSS causes 
reflows. And as something of a real-world example; user agent authors 
could use such a list to scan through a stylesheet, and render the page 
immediately if there are no properties used which potentially require a 
reflow, and otherwise delay the rendering a little to give the page more 
time to load.

Of course there are still things like images without specified 
dimensions, and non-fixed tables are also present a lot, but that 
depends on what you want to render (XML or XHTML), and there are 
actually quite a lot of pages without replaced elements (without 
dimensions) or tables around. And knowing that there is a certain set of 
selectors and properties which if avoided will make the page be 
displayed faster, authors might very well optimize their pages for it.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.

Received on Tuesday, 14 June 2005 20:31:05 UTC