Andre Poenitz a écrit :
On Mon, Apr 03, 2006 at 04:09:44PM +0200, Abdelrazak Younes wrote:
IMHO even if there's no performance penalty on linux (which I really
doubt on slow machine) the way the counters are updated is too heavy.
We should instead maintains lists of interdependent numbered
paragraphs and update only those paragraphs that need updates. In
this context, a kind of DocIterator that will iterates other one of
these lists would be really useful.
Interesting idea.
Thinking further, this 'lists of interdependent numbered paragraph' is
basically a tree (or rather, a 'forest'), and one does not even need to
change any paragraph in 'updateCounters', the couter value could be
extracted on-the-fly at metrics() time from this tree.
Exactly ;-) .
We would just have to "connect" a "Label tracking" object to the
paragraph for which we want to maintain the labeling.
A LabelTracking object maybe independent (enumerate type) or may depend
on a mother LabelTraking object to witch it is connected (ex: Table type
could optionally depend on Section type). A priori there should be only
one section type object but as many as we want enumerate or itemize that
could be created on demand.
This would be almost a no-cost solution.
The only cost is memory. But maintaining a couple hundreds of list of
pointers shouldn't be very heavy.
Abdel.
PS: Sorry for the double-post Andre.