AD
Administrator
Syncfusion Team
April 8, 2003 12:54 AM UTC
Hi Patrick,
DrawString does a bit more stuff than TextOut. A better comparison would be to compare it with DrawText GDI fn because this one also does clipping, word break etc.
You should be able to derive your own cell renderer and draw text using GDI functions but I don't think it is worth the effort. You will not gain much.
The reason is that the time the grid spends doing DrawString is only a small percentage during the paint mechanism. Therefore, even if you have a routine that is faster than DrawString there are still other operations like drawing background, drawing grid lines, calculating layout and cell information.
GDI+ routines should become faster once there is better driver and hardware support from video cards, but I am not sure here what future plans are.
Stefan
PV
Patrick van der Plas
April 8, 2003 05:06 PM UTC
You're right...I constructed an extremely disfunctional grid myself today (only painting cells with lines and text). Just to compare the drawing speed using GDI+ for background/line painting, and GDI (DrawText) for text.
The painting of the background (FillRectangle) and lines slows it down extremely, being much slower than painting all the text using DrawText (GDI).
Using GDI+ for text aswell it slowed down again by factor X ( >2 ), making it just a bit faster than Syncfusion.Grid @ fullscreen (must be well designed considering my grid has close to zero logic ;-).
I sincerely hope Microsoft has some 'masterplan' about GDI+. Just have to wait how it will unfold, like you, I guess...Thread.Abort();