Jean-Marc Lasgouttes wrote:

> Each sample counts as 0.01 seconds.
>   %   cumulative   self              self     total
>  time   seconds   seconds    calls  ms/call  ms/call  name
>   7.37      0.16     0.16  1463980     0.00     0.00 
>   LyXText::getFont(Paragraph const&, int) const
>   6.45      0.30     0.14  3726822     0.00     0.00 
>   FontIterator::operator*() const
>   5.53      0.42     0.12  4065851     0.00     0.00 
>   LyXText::singleWidth(Paragraph const&, int, char, LyXFont const&) const
>   5.53      0.54     0.12  1465689     0.00     0.00 
>   Paragraph::getFontSettings(BufferParams const&, int) const
>   5.07      0.65     0.11   159182     0.00     0.00  (anonymous
>   namespace)::RowPainter::paintChars(int&, bool, bool)
> 
> 
> I am not sure I understand FontIterator::operator*(), since inlining
> it did not improve the situation.

Could the problem be LyXFont's copy constructor? 

> getFont and friends are a real problem (looking for current font at
> each character of a paragraph), and I think that the use of a
> FontIterator (or directly of Paragraph::getEndOfFontSpan) in for
> example RowPainter::paintChars would help. However, the RtL code in
> there scares me :)

;-) You're not the only one here.

Alfredo

Reply via email to