Asger Ottar Alstrup wrote:
Abdelrazak Younes wrote:
No, I was interested in the details of QLPainter::text(), especially
the QPainter::drawText(). This info was not there. It is in your newer
screenshot.
This profile matches what I found on Windows.
If we manage to speed-up Qt drawing operation, we will win. I can't
imagine that there is nothing we can't do. There must be some Qt
settings.
As I said before, I believe the best is to draw less. There is
absolutely no need for redrawing the entire screen on every key press.
I just added a debug statement to QLPainter.C:
if (isDrawingEnabled()) {
lyxerr << "draw " << std::string(str.toUtf8()) << " at " <<
x << "," << y << std::endl;
drawText(x, y, str);
}
You should try this. On every cursor blink, we redraw the entire screen.
I've suspected that indeed.
This might be a result of André's reorganisation of how we paint, or it
may be an old bug. In any case, it is very wasteful.
I guess it is because we use to paint only per paragraph (or even line
IIRC).
Also for the cursor, we used to repaint only the square around the pixel.
If I disable cursor blinking by adding a return in WorkArea::showCursor,
the result is that we redraw exactly once per key press.
So the conclusion is that
- showCursor causes an unnecessary full refresh
This must be fixed.
- drawing text is slow, so draw less text
This will wait 1.6. Too much work to go down the word level.
Thanks Asger,
Abdel.