>>>>> "John" == John Levon <[EMAIL PROTECTED]> writes:

John> On Tue, Apr 05, 2005 at 02:18:58PM +0200, Jean-Marc Lasgouttes
John> wrote:
>>  The font caching in qt2/qfont_loader.C uses a std::map which shows
>> on gprof profiles (around 16% with all optimizations on and no
>> assertions). It appears that Qt has its own font caching mechanism

John> Finally! Good news. What are the heavy hitters now?

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.

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 :)

JMarc

Reply via email to