>>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

>> TransManager::TranslateAndInsert(char, LyXText*) (lyx)

Martin> The last one is fascinating. Inside the code it says:

Note that this part of the tree is collapsed. Probably
TranslateAndInsert triggers lots of other things. Actually, from the
following list

- 19.6% TransManager::TranslateAndInsert(char, LyXText*) (lyx)
- 19.6% TransManager::insert(std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const&, LyXText*) (lyx)
- 19.6% TransManager::insertVerbatim(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, LyXText*) (lyx)
- 19.6% LyXText::insertChar(LCursor&, char) (lyx)
- 19.6% LyXText::setCursor(LCursor&, int, int, bool, bool) (lyx)
- 19.6% LyXText::setCursorIntern(LCursor&, int, int, bool, bool) (lyx)
- 19.6% LCursor::setTargetX() (lyx)

it is not difficult to see that all the time is spent in setTargetX,
which rebreaks the paragraph.

Martin> BTW about understanding this output: is it like a tree:

Yes.

Martin> Hmmm... but a lot less than we used to with this patch.

Not in the case used by Bennett (typing in an inset).

Two interesting points from the list at the end are:

- 49.9% QFontMetrics::width(QChar) const (lyx)
- 34.2% QPainter::drawText(int, int, QString const&, int, 
QPainter::TextDirection) (lyx)

So we spend a _lot_ of time querying width, and if you add the text
drawing (but I suspect you can't really add them), you get a lot.

JMarc

Reply via email to