On Tue, 2005-12-13 at 11:04 +0100, Jean-Marc Lasgouttes wrote: > >>>>> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: > > Bennett> Finally, I applied the patch to the version of lyx compiled > Bennett> with gcc-3.3 with profiling info, ran Shark (in the same way > Bennett> I did before), and placed the report here: > Bennett> <http://edisk.fandm.edu/ > Bennett> bennett.helm/LyX/shark-profile-2.txt.zip>. > > This Shark profile is very interesting (i.e. it works now!) > > Basically it says > > 100% lyx > 98.4% LyXText::dispatch(LCursor&, FuncRequest&) (lyx) > 78.8% BufferView::Pimpl::update(Update::flags) (lyx) > 58.8% LyXScreen::redraw(BufferView&, ViewMetricsInfo const&) (lyx) > 52.4% (anonymous namespace)::RowPainter::paintText() (lyx) > 42.6% (anonymous namespace)::RowPainter::paintChars(int&, LyXFont, > bool, bool) (lyx) > 34.0% QLPainter::text(int, int, char const*, unsigned long, > LyXFont const&) (lyx) > 7.4% font_metrics::width(char const*, unsigned long, LyXFont > const&) (lyx) > 19.3% BufferView::Pimpl::metrics(bool) (lyx) > 19.6% TransManager::TranslateAndInsert(char, LyXText*) (lyx)
The last one is fascinating. Inside the code it says: 276 // Go through the character encoding only if the current 277 // encoding (chset_->name()) matches the current font_norm 278 // (lyrxc->font_norm) 279 280 // Is false to speak about "only if" the current encoding will 281 // almost always be equal to font_norm. Question: is this also true for the Mac? BTW about understanding this output: is it like a tree: 98.4% LyXText::dispatch / \ 78.8% BufferView::Pimpl::update 19.6% TransManager::TranslateAndInsert / \ 58.8% LyXScreen::redraw 19.3% BufferView::Pimpl::metrics > AFAIK, doTextTask is used for painting and metrics (at least). This > means that at least 73.4% of the time is used in Qt/Mac text engine. > > So basically we draw too much :) Hmmm... but a lot less than we used to with this patch. The BufferView::Pimpl::metrics represents calls to redoParagraph, which I tried to sanitize, apparently without much effect in this test case. I say we have a good hard look at TransManager::TranslateAndInsert now :-) - Martin
signature.asc
Description: This is a digitally signed message part