On Fri, Sep 21, 2012 at 12:51:43AM +0200, Pavel Sanda wrote: > Scott Kostyshak wrote: > > void GuiWorkArea::update(int x, int y, int w, int h) > > { > > - viewport()->update(x, y, w, h); > > + viewport()->repaint(x, y, w, h); > > > IIRC it was Andre's claim that we should use update instead of repaint. > Maybe he would know why this slow downs LyX so much.
>From the docs: We suggest only using repaint() if you need an immediate repaint, for example during animation. In almost all circumstances update() is better, as it permits Qt to optimize for speed and minimize flicker. Warning: If you call repaint() in a function which may itself be called from paintEvent(), you may get infinite recursion. The update() function never causes recursion. Andre'