Based on [this article](https://oxyplot.codeplex.com/discussions/281036) I'm using PlotModel.RefreshPlot(true) frequently to load live data, approximately 20 times per second or so, but the performance is not good. It is sluggish and lags behind.
I have 8 line series with 1000 samples/sec each, but reducing the data frequency does not seem to help much, so this does not seem directly related to drawing performance.
There are a few issues:
* RefreshPlot(true) seems to queue on the GUI thread, probably with BeginInvoke, so that if it runs sluggishly it will also start lagging behind with several seconds in a short time.
* RefreshPlot generally feels very slow for a live data scenario
* The GUI thread is locked for big chunks of the time, so even moving the parent window is very sluggish
I am on a powerful PC with pretty recent CPU and GPU, so that should not be the problem. Running Windows 8, but same is seen on Win7.
I have not yet dug into the source code of Oxyplot, but are there any tips on how to improve live data rendering?
Comments: Created a new [pull](https://oxyplot.codeplex.com/SourceControl/network/forks/tibel/plot/contribution/6412) based on the latest changes. It will reduce the time one thread waiting for rendering. That's all what can be done in OxyPlot itself. My and your assumptions were wrong here, I think: Take a Oscilloscope sampling at 5 GHz but it has a TFT display that refreshes with 60 Hz. You can't render at 5 GHz only sampling is done at that speed. It uses data aggregation that then updates the UI at only 60 Hz (max). OxyPlot is some incredible piece of rendering tech but it is only rendering. That means 60 Hz refresh rate. You have to do something similar as an Oscilloscope does to visualize the data sampled at higher rates than redrawing is done.
I have 8 line series with 1000 samples/sec each, but reducing the data frequency does not seem to help much, so this does not seem directly related to drawing performance.
There are a few issues:
* RefreshPlot(true) seems to queue on the GUI thread, probably with BeginInvoke, so that if it runs sluggishly it will also start lagging behind with several seconds in a short time.
* RefreshPlot generally feels very slow for a live data scenario
* The GUI thread is locked for big chunks of the time, so even moving the parent window is very sluggish
I am on a powerful PC with pretty recent CPU and GPU, so that should not be the problem. Running Windows 8, but same is seen on Win7.
I have not yet dug into the source code of Oxyplot, but are there any tips on how to improve live data rendering?
Comments: Created a new [pull](https://oxyplot.codeplex.com/SourceControl/network/forks/tibel/plot/contribution/6412) based on the latest changes. It will reduce the time one thread waiting for rendering. That's all what can be done in OxyPlot itself. My and your assumptions were wrong here, I think: Take a Oscilloscope sampling at 5 GHz but it has a TFT display that refreshes with 60 Hz. You can't render at 5 GHz only sampling is done at that speed. It uses data aggregation that then updates the UI at only 60 Hz (max). OxyPlot is some incredible piece of rendering tech but it is only rendering. That means 60 Hz refresh rate. You have to do something similar as an Oscilloscope does to visualize the data sampled at higher rates than redrawing is done.