Generated content: counters and quotes

Leo Savernik l.savernik at aon.at
Tue Feb 15 21:15:33 GMT 2005


Am Montag, 7. Februar 2005 10:37 schrieb Allan Sandfeld Jensen:
> On Saturday 29 January 2005 00:40, Germain Garand wrote:
> > this looks just great...
> > Only thing I find questionable in your patch is the added stuff in
> > RenderObject, especially the added pointer  to a cache struct.
> > IMO, it should be in at least RenderBox to avoid any unnecessary bloat.
>
> Technically it is because any object that has a style can have a
> counter-node attached. It also reduces the need for
> static_cast<RenderBox*>.

After you having committed your counter-patch (no pun intended ;-) ), I want 
to warm up this old thread.

You state that every render object may have a counter attached. Point taken. 
However, nearly no actual render object *does* have a counter. Hence this 
additional pointer amounts to a lot waste of space on large documents. 
Therefore, I propose to move the counter lists to a QPtrDict within 
DocumentImpl, and reference it from there. The memory and runtime overhead of 
the dict should be negligible compared to the memory overhead of an 
additional member in RenderObject.

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/20050215/e5b6008f/attachment.sig>


More information about the kfm-devel mailing list