renderer_css
CyberSliver opened this issue · comments
Hi,
I'd like to suggest you use DocumentFragment in the CSS renderer to add all the elements in bulk, not one at a time. This will greatly improve performance.
See John Resig's article:
http://ejohn.org/blog/dom-documentfragments/
Thanks, that's a good idea.
Note that it does support re-using dom nodes so that it simply updates the CSS properties on existing nodes. However, I noticed more glitches this way but nightly builds of browsers seem to handle it ok, so it'll use that by default soon.
I'm curious if it will actually be faster to use DocumentFragment than even re-using dom nodes, as it seems it kicks off a bunch of work to recalculate stuff when I just update CSS properties.
You can turn on re-using dom nodes by calling dom3d.current_renderer().use_refs()