Jean-Marc Lasgouttes a écrit :
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
I am in vacation ;)
Abdelrazak> Oups sorry then, I should have waited for your approval as
Abdelrazak> this toc code is apparently yours and Angus'
So what you do (apart from moving code around) is to compute the toc
at updateLabels time and cache it. Right?
Right.
I guess the reason why you want to do that is that
DocIterator::forwardPar is too slow on windows and you want to work
aroound it. Right again?
Right. But it's not only that, with my Toc synchronization patch, the
toc update was called at each keystroke or scroll operation; so I had to
make this operation cheap by caching the contents in TocBackend and
update them when needed.
In this case, you should really merge updateLabels and the toc
construction. This would avoid to iterate twice through the document.
Right, this is the next step.
Also, I am not sure I understand what the relationship between toc.[Ch]
and TocBackend.[Ch] is now. Why two files?
I wanted to keep API compatibility with the other frontends so toc.[Ch]
was necessary. Also, a TocBackend is Buffer dependent; so a static map
of TocBackend is maintained in "toc.C". I plan to transfer this map to a
private member of Kernel that will be accessible via "tocs()" or maybe
"toc(Buffer const &)". After that map is transfered, toc.[Ch] can go.
Is that OK for you?
Abdel.