Abdelrazak Younes wrote: > So Linux is faster on your machine than windows! That's a surprise since > many complained that it was damn slow on linux. Helge Hafting, you were > the more vocal among them ;-), could you try again?
Maybe he had used a non optimized build. >> >> LyX 1.3.6, Qt 3.3.4 >> Linux no anti-al.: 6-7 >> Linux with anti-al.: 6-7 >> >> >> Is 1.5 so slow only because of Qt >> or are there also changes of LyX >> responsible for? > > The more I think about it the more I reckon Qt painting speed is not the > issue. This is comforted by these numbers: > >> -Modules, 42.530127 >> -QtGui4.dll (SymExport), 18.157461 >> QPainter::drawTextItem, 3.968417 >> QPainter::drawPixmap, 1.599013 > > Where are the remaining 12 or 13 seconds? I think the sum of all small numbers. > I think there might be something about the frequency of the paintEvent. > Qt4 adjust the number of paintEvent per second depending on the need but > there's a maximum update rate. > > Another piste is the automatic double buffering that Qt4 does. The doc > says that it can be disabled on X11: > > Note: Under X11 it is possible to toggle the global double buffering by > calling qt_x11_set_global_double_buffer(). Example usage: > ... > extern void qt_x11_set_global_double_buffer(bool); > qt_x11_set_global_double_buffer(false); > ... > > Could you try that on linux? Yes, that is interesting. > >> Looking at the profiling times I think >> by a better buffering QPainter, QBrush, >> and QPen we can get a a bit without to >> much changes: > > I sent a patch that does just that but the result was not that good. > Maybe because it was not complete: it did not cache the QPainter with > fonts change and I suspect that that is the heaviest one. I'll send it > again sometimes. Maybe we could begin the painting when the QPixmap is assigned in QWorkArea, and only end when there comes a resized one (and on close). >> >> QPainter::QPainter, 0.828970 >> QBrush::init, 0.537057 >> QBrush::cleanUp, 0.520920 >> QPainter::~QPainter, 0.421153 >> QPen::operator=, 0.221603 >> QPen::QPen, 0.200135 > >> >> Maybe someone has an idea when looking >> at the Lyx functions (do we really >> need so much libintl_dcigettext calls?) > > I don't know much this field but I guess we could cache the translated > messages on startup instead of requiring a translation each time. Or do > we do that already? Jean-Marc? > > Nice investigation work Peter! Thanks, Peter