On Nov 15, 2006, at 11:41, Vincent Hennebert wrote:
Just to let you know that I'd like to finish the implementation of the
collapsing border model.
I've started to look at the wiki pages, the code and the mail archives
but if you have any hint about what are the remaining problems to
where to look at in particular, etc., I'm all ears ;-)
Collapsing borders again, ay? 8)
Well, I still have some ideas up my sleeve for optimization, but
AFAIU the basic implementation that Jeremias initially added should
work nicely, except for the part that is documented on the Wiki.
Unfortunately, I haven't had too much time lately to invest into
this, but roughly it comes down to moving a great deal of the
collapsing-border-logic to the FOTree. I've had numerous fruitful
discussions with Jeremias about this in the past, and I'm still
convinced that it would be a good move --performance-wise-- to
relocate those parts to the FOTree, and make them accessible to the
layoutengine from there.
Although it is almost never possible to resolve the borders
completely at that stage, since you have no page-breaking context
yet, I still feel much for performing as much of the resolving as
possible before the layoutengine even gets its hands on those FO nodes.
It's not a BIG problem, but still it seems like a waste to have a
table with potentially thousands of cells, each one having a
CommonBorderPaddingBackground with BorderInfo objects that basically
all have the same properties (width / color / style), so my ideas go
in the direction of reducing the number of separate BorderInfo
instances drastically. If, for example, the table's start-borders
would win for all rows, then it seems logical to me that all the
cells adjacent to that start-edge actually share that very same
Another way to go about that would be to implement BorderInfo as a
fly-weight, so that even when there are many different tables with
identical border-properties, there is actually only one BorderInfo
alive to which all the related FO nodes share a reference...
That said, these ideas for improvement can easily wait until we have
a fully working implementation to begin with, so go right ahead with
this. The community is going to love you for it (if you still needed
motivation ;) )