Forum > QT
TextOut benchmark - Qt5 is about 2x slower than Gtk2
AlexTP:
Pls see the benchmark demo from
https://forum.lazarus.freepascal.org/index.php?topic=55431.0
On gtk2:
- only "TextOut" is checked -> paint time is ~20ms here
- only "colored TextOut" is checked -> time is ~30ms
- both "TextOut" and "colored TextOut" checked -> time is ~120ms (non liner grow! bad!)
On Qt5:
- only "TextOut" is checked -> paint time is ~40ms here
- only "colored TextOut" is checked -> time is ~50-60ms
- both "TextOut" and "colored TextOut" checked -> time is ~100-110ms (liner grow, at least - it is good)
Qt5 timings are about 2x slower than Gtk2!
PC: CPU Intel Core i3, OS Ubuntu 20.x.
AlexTP:
Zeljko, can you do something here, please?
I appreciate your work on Qt5 WS.
zeljko:
So, on my machine Qt5 needs cca 58 msec, gtk2 30 msec for simple draw text (only one checkbox is checked). When I comment QtDC.drawText() from TQtWidgetSet.ExtTextOut (which is called by Canvas.TextOut) then Qt5 needs more than 30msec (but draws nothing), so need a lot of investigation about allocating font & brushes for QPainter. Tested pure Qt5 drawText() and it needs less than 30 msec.
AlexTP:
We have a change to speed up, good.
AlexTP:
@zeljko
I think about the additional way to render the text, not C.TextOut nor C.ExtTextOut. Additional method - we name it. Like C.TextEx. This method must render some text string (one liner only, handling of EOLs and TABs must be in caller). With custom font color + custom BG color (or transparent BG, it is enough, we can fill BG ourself). Maybe - not sure here - with custom Dx offsets, but it is optional.
If it will be fast, I will use it in the text-editor.
What do you think?
Navigation
[0] Message Index
[#] Next page