PiGraham,
I'm just starting to look into what is using most of the time. I'm still sitting at a low cpu load, so it's probably still gpu or communication to the gpu limited.
I had the same thought about drawing the new polygons and shifting the old ones, but i haven't gotten there yet in programming it. I also have to decide just how i want to pull in the data. I was thinking it would pull from a ring buffer, so although it's not efficient to re-plot every point, if i can re-plot the ring buffer fast enough it will scroll and then i don't have to figure out what was already plotted. Also, if the data outruns the plotting, it just skips points. So far I'm just happy to have exceeded my requirement for the number of points plotted per second, so I can start working on more details of the implementation.
I'm not currently processing the data at all, and it's just randomly generated until I write the spi driver to pull data from the ADC IC. I want to do a simple offset and scaling, a running average, max, min, standard deviation, least squares linear fit slope, and compute an fft and plot that as well. The fft plot update rate being slow would be acceptable (once per second?). Though the hello_fft source included with raspbian pumps fft's through the gpu at ludicrous speeds so i might try to go significantly faster.
There really isn't appreciable lag in the data acquisition. The chip that I'm going to connect to is self clocked and overwrites it's own data register 4800 times per second (times 8 of them). If the driver falls behind it would start dropping data. That operation will probably be handled by a spi kernel driver to the ring buffer i mentioned.
I actually introduced a bug when i switched to the vguPolygon() function. It seems like if I load too many in at once bad things happen. See here for more details.
http://www.raspberrypi.org/forums/viewt ... 33#p572533