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.
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.
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
- drawing text is slow, so draw less text
Regards,
Asger