Re: QLPainter statistic

2006-06-12 Thread Andre Poenitz
On Fri, Jun 09, 2006 at 10:49:02PM +0200, Abdelrazak Younes wrote: > Note that my primary target for optimisation is X11 and Mac. For me Qt4 > on windows is fast enough. > > [interesting stuff] > > >Well... when I think about it, it might be possible that QPicture > >compresses some operations a

Re: QLPainter statistic

2006-06-09 Thread Abdelrazak Younes
Andre Poenitz wrote: On Thu, Jun 08, 2006 at 10:29:39AM +0200, Abdelrazak Younes wrote: Abdelrazak> The QPicture class "records" painting operations, it is Abdelrazak> similar to vector based painting (SVG or windows Meta Abdelrazak> file). So when you paint onto a QPicture it is not a real Abde

Re: QLPainter statistic

2006-06-09 Thread Andre Poenitz
On Thu, Jun 08, 2006 at 10:29:39AM +0200, Abdelrazak Younes wrote: > >>>Abdelrazak> The QPicture class "records" painting operations, it is > >>>Abdelrazak> similar to vector based painting (SVG or windows Meta > >>>Abdelrazak> file). So when you paint onto a QPicture it is not a real > >>>Abdelraz

Re: QLPainter statistic

2006-06-08 Thread Abdelrazak Younes
Andre Poenitz wrote: On Tue, Jun 06, 2006 at 06:10:08PM +0200, Abdelrazak Younes wrote: Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> The QPicture class "records" painting operations, it is Abdelrazak> similar to vector based painting (SV

Re: QLPainter statistic

2006-06-07 Thread Peter Kümmel
Andre Poenitz wrote: >> complete QLPainter member functions: >> Scope 12,ms : 1236 -> setQPainterPen > > Hm, switching pens is known to be extraordinarily expensive in Qt 4. > Things have a bit improved in 4.1.3, though. > Yes, there is a place where we could optimize a bit. >> Scope 14,

Re: QLPainter statistic

2006-06-07 Thread Andre Poenitz
On Sun, Jun 04, 2006 at 07:52:42PM +0200, Peter Kümmel wrote: > Here some statistics of QLPainter functions: > > I've measured the time which the program is > in an scope, see attached patch. Is there a reason why you can't use a profiler? > The results are: > > complete QLPainter member functi

Re: QLPainter statistic

2006-06-07 Thread Andre Poenitz
On Tue, Jun 06, 2006 at 06:10:08PM +0200, Abdelrazak Younes wrote: > Jean-Marc Lasgouttes wrote: > >>"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: > > > >Abdelrazak> The QPicture class "records" painting operations, it is > >Abdelrazak> similar to vector based painting (SVG or w

Re: QLPainter statistic

2006-06-07 Thread Andre Poenitz
On Sun, Jun 04, 2006 at 11:27:46PM +0200, Peter Kümmel wrote: > How often have I heard that the painting performance of Qt4 is so bad, > bad, bad... > > And all what we can do is to hope it becomes better, seems Trolltech > has forgotten it's clients. Not really. They do work a bit on speed issue

Re: QLPainter statistic

2006-06-07 Thread Peter Kümmel
Lars Gullik Bjønnes wrote: > | Note that there is room for improvement in our fontcache which uses a > | std::map. A vector will probably not use too much memory (for 8bit > | fonts) and be much faster. > > It will not be 8bit fonts. > > We should use a unordered_map and fallback to map if that i

Re: QLPainter statistic

2006-06-07 Thread Peter Kümmel
Lars Gullik Bjønnes wrote: > Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > | > "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes: > | > | Peter> With enabled USE_LYX_FONTCACHE it is a little bit faster > | Peter> (because the value of QLFontInfo::width becomes smaller > | Peter> compa

Re: QLPainter statistic

2006-06-07 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | > "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes: | | Peter> With enabled USE_LYX_FONTCACHE it is a little bit faster | Peter> (because the value of QLFontInfo::width becomes smaller | Peter> compared to the others: enabled 100<->48, disa

Re: QLPainter statistic

2006-06-07 Thread Peter Kümmel
Jean-Marc Lasgouttes wrote: >> "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes: > > Peter> With enabled USE_LYX_FONTCACHE it is a little bit faster > Peter> (because the value of QLFontInfo::width becomes smaller > Peter> compared to the others: enabled 100<->48, disabled 100<->47) > > I'd

Re: QLPainter statistic

2006-06-07 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Just for clarity, the map doesn't cache fonts, only font Abdelrazak> widths (with Uchar as the key). The font cache is done Abdelrazak> elsewhere in 4-dimensional C-array (fontinfo_). Indeed. JMarc

Re: QLPainter statistic

2006-06-07 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes: Peter> With enabled USE_LYX_FONTCACHE it is a little bit faster Peter> (because the value of QLFontInfo::width becomes smaller Peter> compared to the others: enabled 100<->48, disabled 100<->47) I'd say it is the s

Re: QLPainter statistic

2006-06-07 Thread Jean-Marc Lasgouttes
> "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes: Peter> With enabled USE_LYX_FONTCACHE it is a little bit faster Peter> (because the value of QLFontInfo::width becomes smaller Peter> compared to the others: enabled 100<->48, disabled 100<->47) I'd say it is the same (the margin error is

Re: QLPainter statistic

2006-06-07 Thread Peter Kümmel
Jean-Marc Lasgouttes wrote: >> "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes: > > Peter> So optimizing the text drawing functions couldn't more than > Peter> doubling the speed. > > On LyX/Mac, the other half is taken by QLFontInfo::width. You may want > to experiment with USE_LYX_FONTCA

Re: QLPainter statistic

2006-06-07 Thread Peter Kümmel
Jean-Marc Lasgouttes wrote: > No, but Matthias says that Qt slowness is just a rumor. We must be > dreaming. Maybe we live in different Matrix. :) Peter

Re: QLPainter statistic

2006-06-07 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> These two threads provide some interesting reading on the Angus> subject of slow drawings: Angus> http://lists.trolltech.com/qt-interest/2005-10/thread00915-0.html Angus> http://dot.kde.org/1135084395/1135109572/ Angus> They don't

Re: QLPainter statistic

2006-06-07 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Where does it explain that it is faster? I did not find it. Abdelrazak> _I_ explained to you above ;-) So you just tried to see what happens and saw it is faster, right? But does trolltech recommend t

Re: QLPainter statistic

2006-06-06 Thread Angus Leeming
Abdelrazak Younes <[EMAIL PROTECTED]> writes: > > Abdelrazak> The QPicture class "records" painting operations, it is > > Abdelrazak> similar to vector based painting (SVG or windows Meta > > Abdelrazak> file). So when you paint onto a QPicture it is not a real > > Abdelrazak> painting. The real pa

Re: QLPainter statistic

2006-06-06 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> Where does it explain that it is faster? I did not find it. Abdelrazak> _I_ explained to you above ;-) So you just tried to see what happens and saw it is faster, right? But does trolltech recommend to use this interface for

Re: QLPainter statistic

2006-06-06 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> The QPicture class "records" painting operations, it is Abdelrazak> similar to vector based painting (SVG or windows Meta Abdelrazak> file). So when you paint onto a QPicture it is not a real A

Re: QLPainter statistic

2006-06-06 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> The QPicture class "records" painting operations, it is Abdelrazak> similar to vector based painting (SVG or windows Meta Abdelrazak> file). So when you paint onto a QPicture it is not a real Abdelrazak> painting. The

Re: QLPainter statistic

2006-06-06 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Please find attached the patch. The main problem with it Abdelrazak> is that everything that is drawn in screen stays. So it Abdelrazak> conflict with the background drawing that the kernel doe

Re: QLPainter statistic

2006-06-06 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Please find attached the patch. The main problem with it Abdelrazak> is that everything that is drawn in screen stays. So it Abdelrazak> conflict with the background drawing that the kernel does Abdelrazak> to erase so

Re: QLPainter statistic

2006-06-06 Thread Peter Kümmel
Abdelrazak Younes wrote: > Peter Kümmel wrote: >> Here more numbers, with this setup: >> >> MSVC8 >> Qt 4.1.2 release > > Please update to 4.1.3. There are some nice drawing optimization there. > Most noticeably for Mac and Linux but I've seen improvment on WinXP also. > Is planned. >> So optimi

Re: QLPainter statistic

2006-06-06 Thread Abdelrazak Younes
Peter Kümmel wrote: Here more numbers, with this setup: MSVC8 Qt 4.1.2 release Please update to 4.1.3. There are some nice drawing optimization there. Most noticeably for Mac and Linux but I've seen improvment on WinXP also. So optimizing the text drawing functions couldn't more than doubl

Re: QLPainter statistic

2006-06-06 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes: Peter> So optimizing the text drawing functions couldn't more than Peter> doubling the speed. On LyX/Mac, the other half is taken by QLFontInfo::width. You may want to experiment with USE_LYX_FONTCACHE in qfont_loa

Re: QLPainter statistic

2006-06-06 Thread Peter Kümmel
Michael Abshoff wrote: >> Here more numbers, with this setup: >> >> MSVC8 >> Qt 4.1.2 release >> lyx-qt4 release -O2 >> AMD XP 1.1Ghz, 100 Mhz Ram >> > > > Where do I get one of those? :) > It's down clocked :) > > Nope, valgrind doesn't help here much. There is a valgrin

Re: QLPainter statistic

2006-06-06 Thread Michael Abshoff
> > Here more numbers, with this setup: > > MSVC8 > Qt 4.1.2 release > lyx-qt4 release -O2 > AMD XP 1.1Ghz, 100 Mhz Ram > Where do I get one of those? :) > > Page down-key scrolling time of the User's Guide: > > 55s > > but when I disable all functions of QLPainter > (just r

Re: QLPainter statistic

2006-06-06 Thread Jean-Marc Lasgouttes
> "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes: Peter> So optimizing the text drawing functions couldn't more than Peter> doubling the speed. On LyX/Mac, the other half is taken by QLFontInfo::width. You may want to experiment with USE_LYX_FONTCACHE in qfont_loader.h to see whether our

Re: QLPainter statistic

2006-06-06 Thread Peter Kümmel
Here more numbers, with this setup: MSVC8 Qt 4.1.2 release lyx-qt4 release -O2 AMD XP 1.1Ghz, 100 Mhz Ram Page down-key scrolling time of the User's Guide: 55s but when I disable all functions of QLPainter (just returning immediately) I still get 25s So optimizing the text drawing function

Re: QLPainter statistic

2006-06-05 Thread Abdelrazak Younes
Peter Kümmel wrote: Abdelrazak Younes wrote: Yes. I have been experimenting with a QPicture cache between QLPainter::start() and QLPainter::end() which would replay the QPicture into the QWorkArea painting_device_ (which is a QPixmap). The speedup is awesome. Unfortunately the core is not prep

Re: QLPainter statistic

2006-06-05 Thread Abdelrazak Younes
Peter Kümmel wrote: Abdelrazak Younes wrote: Yes. I have been experimenting with a QPicture cache between QLPainter::start() and QLPainter::end() which would replay the QPicture into the QWorkArea painting_device_ (which is a QPixmap). The speedup is awesome. Unfortunately the core is not prep

Re: QLPainter statistic

2006-06-04 Thread Peter Kümmel
Abdelrazak Younes wrote: > Yes. I have been experimenting with a QPicture cache between > QLPainter::start() and QLPainter::end() which would replay the QPicture > into the QWorkArea painting_device_ (which is a QPixmap). The speedup > is awesome. Unfortunately the core is not prepared for that k

Re: QLPainter statistic

2006-06-04 Thread Abdelrazak Younes
Peter Kümmel wrote: Abdelrazak Younes wrote: Peter Kümmel wrote: The most time is spend in the Qt function QPainter::drawText. Could this time be reduced? I came to the same conclusion with the Mac profiling done by Bennett. I guess we can't do much about QPainter::drawText beca

Re: QLPainter statistic

2006-06-04 Thread Peter Kümmel
Abdelrazak Younes wrote: > Peter Kümmel wrote: >> The most time is spend in the Qt function QPainter::drawText. >> Could this time be reduced? > > I came to the same conclusion with the Mac profiling done by Bennett. I > guess we can't do much about QPainter::drawText because this is part of > the

Re: QLPainter statistic

2006-06-04 Thread Abdelrazak Younes
Peter Kümmel wrote: The most time is spend in the Qt function QPainter::drawText. Could this time be reduced? I came to the same conclusion with the Mac profiling done by Bennett. I guess we can't do much about QPainter::drawText because this is part of the Qt API. Abdel.

Re: QLPainter statistic

2006-06-04 Thread Peter Kümmel
Peter Kümmel wrote: > complete QLPainter member functions: > Scope 12,ms : 1236 -> setQPainterPen > Scope 14,ms : 812 -> line > Scope 15,ms : 172 > Scope 16,ms : 46 > Scope 17,ms : 3683 -> fillRectangle > Scope 20,ms : 16 > Scope 22,ms : 514 > Scope 23,ms : 201 >