OxyPlot Xamarin.Android Dynamic Plot Performance

Yun 2 years ago in Bugs • updated by yuyan 2 years ago 1

Hi All,

I am using Xamarin.Android.OxyPlot to do dynamic data plot.

Here my questions is:

(1 )

When there are multi PlotViews on screen, there seems to be a “interference” between each other.Now the situation is : I have 4 plotviews on-screen, I create a invalidatePlot_new(Dirty Rect) method to draw partially for one plotview, picturing 1st plotView draw partially everytime, the other 3 call InvalidatePlot(true) by default(which will redraw entire view everytime). Why the 1st also redraw entire View also? It seems that 1st plotView is also following the others. It only draw partially when I set all 4 plotviews to call invalidatePlot_new(Dity Rect).


Second question is, I am fetching data at HIGH Frequency(2k Hz or more). I assume plotView could draw 20 times/sec with 100 plots every time. Well in fact it takes much longer to finish one plotView (60ms or more). I understand that a lot of Customized Canvas Draw happening which takes tons of CPU usage( 40% or more). So is there anyway I could decrease CPU usage, I’ve heard that using drawLines() instead of drawPath() will be more efficient. My goal is to limit each OnDraw() lower than 40ms( I can get 25 fps at least), also CPU usage lower than 30% since I will add more features based on this project.

Since not too many docs about Xamarin.Android.Oxyplot, so I hope this the right place I could get some help.

Of course, thanks for your great work, I really enjoy working with OxyPlot Library. Thanks ahead for you guys.