November 20, 2006
I’m writing an application that needs to process and display real-time data. I can easily process the data in real-time; however, some very rough tests show that the DataGridView control in .NET can do 80 repaints per second (on my little laptop). That won’t be fast enough to display data in real-time. But a user interface does not need to display data in “real-time” because it is too fast for humans to notice and react to anyway. There’s no reason to go beyond 30 Hertz, since that’s what TV does to display video. If that’s the max, then I only need to do 15 or 10 Hertz to display charts and grids of data. My design will fill a data cache in real time and fire a heartbeat timer every ~100ms to refresh the UI controls that have changed. This will reduce the CPU load and allow more time for richer processing. I just need to find out how other real-time UIs do this to confirm if this is a decent design.