Performance Issue with TChart

允我心安 提交于 2019-12-12 00:59:55

问题


I'm using Steema TChart in my application. I use this component to chart a line graph, typically containing 1,000 to 2,000 data points, realtime as the data points become available. A typical line takes about 30 seconds to complete.

After my 2nd or 3rd line is being generated, the TChart component reaches a point where the processor is being pegged. Even though the chart is being updated, other UI updates are being drastically affected by the redraw that the chart must be performing each time a new data point is added. I've experimented and found that if I don't show the chart while a line is being plotted (the chart is on a separate tab on the window; however it is not currently displayed) I have much better performance and the processor usage goes down dramatically.

Has anyone found ways to use this component and have better performance?


回答1:


In that case probably asynchronous painting technique, using AutoRepaint property as suggested in this thread, will help enhancing your system's performance. Basically you need to set Autorepaint to false to prevent the chart repainting after adding a point and set it back to true and call refresh when data addition has finished.

The Real-time Charting article here may also help improving your TeeChart application's performance. This is a Delphi article but most of it can be applied to the .NET version of TeeChart also.

Last but not least, TeeChart for .NET ships with a Direct2D rendering engine. This is ideal for the high speed data throughput required by DSP realtime applications. See the White paper, Boosting graphics-rendering performance in Windows Forms, for a closer look.



来源:https://stackoverflow.com/questions/11977423/performance-issue-with-tchart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!