Bennett Helm wrote:
Well, here is a profile for Mac. I created a new document with enough
text to fill the screen, placed the (invisible) cursor in the middle of
the screen, started profiling and typed at a brisk pace for 30 seconds.
(As I type this, LyX is still churning away displaying what I typed on
screen very slowly.) Here's the result (attached).
Very nice Bennett but, unfortunately I am missing one level at this node:
+ 12666.6 ms lyx::(anonymous namespace)::RowPainter::paintText() (lyx)
| + 10890.5 ms lyx::frontend::QLPainter::text(int, int, wchar_t const*,
| | + 146.5 ms lyx::ucs4_to_qstring(wchar_t const*, unsigned long,
| | | + 50.2 ms QString::operator[](int) (lyx)
| | | | 40.0 ms std::vector<lyx::Changes::ChangeRange,
| | | + 43.0 ms QCharRef::operator=(QChar const&) (lyx)
| | | | 35.9 ms std::vector<lyx::Changes::ChangeRange,
| | | 4.1 ms lyx::Changes::lookup(int) const (lyx)
| | + 98.3 ms QString::~QString [in-charge]() (lyx)
| | | 7.2 ms QString::~QString [in-charge]() (lyx)
| | 44.1 ms operator new(unsigned long) (libstdc++.6.dylib)
| | 22.5 ms __cxa_guard_acquire (libstdc++.6.dylib)
| | + 18.4 ms lyx::LyXFont::realColor() const (lyx)
| | | 2.0 ms lyx::frontend::GuiFontLoader::metrics(lyx::LyXFont
| | + 14.3 ms lyx::frontend::GuiFontLoader::fontinfo(lyx::LyXFont
| | | 8.2 ms lyx::LyXFont::realShape() const (lyx)
| | | 2.1 ms lyx::Changes::lookup(int) const (lyx)
| | + 13.3 ms lyx::frontend::QLPainter::setQPainterPen(
| | | 2.0 ms lyx::LyXFont::realShape() const (lyx)
| | 6.1 ms lyx::InsetExternalParams::read(lyx::Buffer const&,
| | 5.1 ms lyx::LyXTextClass::load(std::basic_string<char,
| | 4.1 ms operator delete(void*) (libstdc++.6.dylib)
| | + 3.1 ms lyx::LyXFont::realShape() const (lyx)
| | 2.0 ms lyx::BufferView::gotoLabel(std::basic_string<wchar_t,
| | 1.0 ms std::_Vector_base<wchar_t, std::allocator<wchar_t>
| | 1.0 ms lyx::BufferView::dispatch(lyx::FuncRequest const&) (lyx)
| | 1.0 ms lyx::BufferView::~BufferView [in-charge]() (lyx)
| + 440.7 ms lyx::LyXText::getFont(lyx::Paragraph const&, int) const
As you can see in the second line, QLPainter::text() take the most time.
This is not surprising but the following lines between this node an the
following node at the same level (LyXText::getFont()) don't make the
sum. There's some info in between that is missing. Could you please
(when you have time) have a look at it?
Thanks in advance,
Abdel.