Generated content: counters and quotes

Leo Savernik l.savernik at aon.at
Wed Feb 16 18:14:13 GMT 2005


Am Dienstag, 15. Februar 2005 22:47 schrieb Allan Sandfeld Jensen:
> > additional member in RenderObject.
>
> Sounds interesting. Notice however that all lists and list-items now have a
> counter attached.

Yeah, but only estimated 2% of all render objects will be actual list items. 
That means, in a document containing 100000 render objects, we incur a space 
overhead of 400000 bytes. With a hashmap, we only use space for the purported 
2% of counter-attached nodes, we only have 2000 bytes over (+ overhead of the 
hashmap structures which we occur only once).
>
> With a global structure we really just need a fast way to lookup:
> name*render-node -> counter-node

QPtrDict is a hashmap, so it's O(1). There should be a convenience method that 
allows accessing an associated counter node like

xmlDocImpl()->attachedCounterNode(this)

mfg
 Leo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20050216/63c355ff/attachment.sig>


More information about the kfm-devel mailing list