It is true that GDI + is not very good in performance, but I myself wrote a GDI + plotter in a work-related project that is able to spit out graphs with thousands of dots at ~ 30 frames per second at a resolution of 1680x1050 (scroll graph).
It took a lot of settings:
- Convert everything in one way before drawing.
- If you use back-buffer, use one with the pixel format Format32bppPArgb, this can speed up blitting 2-4x.
- If you draw a path using a lot of vertical lines (high frequency signal), instead draw them as horizontal lines on the back buffer, and then draw an image rotated on the screen. Keep in mind that when you rotate the image there is also a certain cost.
I donβt see how your script requires a lot of optimization, although 128 data points are nothing. Including these points in a single GraphicsPath could make a difference, since that would mean less sorting workload.
What resolution and frame rate are we talking about here, by the way?
source share