Jean-Marc Lasgouttes wrote:
So, basically, 60% of the time spent in updateLabel is spent in
TocBackend::update. The said TocBackend::update call has been added at
some point by some sloppy Gremlin who thought that nobody would
notice.
So: updateLabel is fast. TocBackend::update is slow.
I am pretty sure that was the opposite when I added this call. i.e.
TocBackend::update() was using only 20 percent or so. Maybe your recent
cleanup optimized it quite a bit. Could you do a profile for 1.5?
The later problem could be addressed by rewriting it like updateLabels
to avoid using ParConstIterator. This is as easy as defining a
InsetText::addToToc (and a InsetLabel::addToToc, maybe).
Maybe yes.
However, I wonder whether the best solution would not be to merge the
two functions in order to maintain an über-ToC, containing also
enumerations and such niceties. This would also allow to remember
counters and do local-only renumbers.
That would be best.
Abdel.