On Sat, 11 Jan 2003 13:53:27 +0100, Krzysztof Dubowik said: > It's a simulator of a measuring device where the sampling rate is fixed at > 200Hz. I want to draw the graph at "real-time" - 1 pixel per 5ms. Optimization 1: Remember that the actual monitor probably won't be refreshing any faster than 75Hz, so you can batch up updates and only push them out once per refresh. Optimization 2: Remember that monitors refresh at 72/75Hz so their refresh rate is far above the "flicker" rate, and that most of the time, you can get away with MUCH lower refresh rates - most of the time, people don't complain in the slightest about movies at 24fps or TV at 30fps. You may be able to get a BIG performance boost if you run the simulation at an effective 200hz, but batch up your updates 8 at a time at 25fps. Or you might look at using a 40ms timeout and doing 8 per timeout - this has the advantage of being a long enough timeout that most kernels will be able to deal with it in a sane manner.... -- Valdis Kletnieks Computer Systems Senior Engineer Virginia Tech
Attachment:
pgptDvOmRbp2j.pgp
Description: PGP signature