r7004 struggleyb - /branches/struggleyb/domts-transform-perl/DOMTSHandler.pm

John-Mark Bell jmb at netsurf-browser.org
Tue Mar 31 12:09:24 BST 2009


On Tue, 2009-03-31 at 12:05 +0100, Daniel Silverstone wrote:
> On Tue, 2009-03-31 at 11:43 +0100, John-Mark Bell wrote:
> > > > +	DOMString => "dom_string *",
> > > Out of interest, should we be porting libdom to libwapcaplet to allow
> > > for faster node name comparison etc when we start to need to apply
> > > libcss to libdom? I believe hubbub will be migrating to libwapcaplet
> > > too.
> > I think so. However, I wonder if you have any thoughts about interning
> > Text/CDATASection node contents? I'm not entirely convinced that it's
> > worth it. There's an obvious win for everything else, though.
> 
> It's only worth interning those if it'll help later for the physical
> layout, or to keep all the interfaces the same.
> 
> The former is unlikely, the latter isn't a bad plan.
> 
> Interning them only costs once anyway, so it's not exactly hard, and
> then the layout engine could intern substrings of it for the box nodes
> if it needed to, which would reduce memory repetition.

Ah yes. I'd not considered the implication of being able to intern
substrings :) I think, therefore, that s/dom_string/lwcstring/g on the
libdom source tree is the thing to do, then.


J.




More information about the netsurf-dev mailing list