[patch] Attr values as Text nodes

Harri Porten porten at froglogic.com
Tue Mar 25 11:56:46 GMT 2008


Hi!

On Tue, 25 Mar 2008, David Faure wrote:

>> The attached patch makes the Attr node have a text child node right away.
>> Could be done lazily? Dunno.
>
> Well, it sounds like a large increase in memory consumption, if done unconditionally, no?
> One element can have many attributes, so if no (JS or C++ DOM) code is looking for that node
> it seems a bit overkill. On the other hand I'm not sure when/where it could be created lazily.

Functions like firstChild() etc. are virtual and could be implemented to 
only create the node on first-access.

But I'm not fully sure whether the memory overhead is really there as I 
though that this node is only created on demand anyway. Will double-check 
that.

Harri.





More information about the kfm-devel mailing list