Abdelrazak Younes a écrit :
Jean-Marc Lasgouttes a écrit :
"Juergen" == Juergen Spitzmueller
<[EMAIL PROTECTED]> writes:
Juergen> Jean-Marc Lasgouttes wrote:
Not surprising, too much cut and paste.
Try that instead.
Juergen> Not much different (perhaps a bit faster, hard to say).
I see a big difference in gprof, but this is probably because it does
not take IO time into account. This is a patch that should go in at
some time, so I keep it somewhere.
Just for your info, it seems that there is a _very_ small improvement
under windows for paragraph creation/deletion.
Out of interest I tried the following patch to understand how I can
speedup updateCounter. This is _not_ proposed for inclusion, I
understand this is not practical for inside inset numbering.
Well, the good news is that, with this patch, paragraph
creation/deletion is _instantaneous_ (even with fast key+enter
repetition). I guess this is normal (and this is the bad news) because
the section are not numbered so setCounter() doesn't seem to work with
the ParIterator I am giving to it.
I first tried to use the "ParIterator(InsetBase &, lyx::pit_type pit)"
constructor but this one is not implemented.
Question: what does it take (except for "it.pos()=i") to have a valid
ParIterator at position i in my code?
As usual, I managed to answer to my own question: pit() did the trick
but I had to add the following method to ParIterator:
pit_type & pit() { return DocIterator::pit(); }
The bad news is that the slowness came back... :-(
This means that the culprit is somewhere in setCounter. This method
looks awfully complicated to me and I think I will just stop searching
for now as I guess my eventual contribution would not even be considered.
Bye,
Abdel.