Jean-Marc Lasgouttes wrote:
Abdelrazak Younes <[EMAIL PROTECTED]> writes:

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 situation in 1.5 is:

[7]     87.3    0.39   22.08     171         lyx::updateLabels(lyx::Buffer const 
&, bool) [7]
                0.27    8.17     171/171         lyx::TocBackend::update() [13]
                0.06    6.79  444685/444685      lyx::ParIterator::operator++() 
[14]


[13]    32.8    0.27    8.17     171         lyx::TocBackend::update() [13]
                0.04    6.79  444685/444685      
lyx::ParConstIterator::operator++() [15]
                0.13    0.62 1382191/1384072     
lyx::ParConstIterator::operator->() const [50]


This means that only 36% of the time was spent in TocBackend::update
in 1.5. Assuming that everything else is equal between 1.5 and 1.6svn
(for this rebreak intensive session), a simple computation indicates
that the updateLabel part has been sped-up by a factor of 2.25!

You've done a good job, I am proud of you ;-)


In any case, merging TocBackend::update into updateLabels makes much
sense.

Agreed.

Abdel.

Reply via email to