Jump to content
Software FX Community

Custom Drawing, Painting, and Performance Suggestions


houog

Recommended Posts

We are currently offering some custom drawing tools in our application. The annotation tools will not suffice for this project given the complexity and customization of the drawing requirements. In testing so far, we have seen a negative relationship between the rise in the number of data points and the performance of the chart/drawing. This is expected. However, are there some things we can do to help with the performance? Here's what we've implemented so far:

1. Minimized or turned-off various properties which could slow down rendering: Gallery (scatter), MarkerShape (Rect), MarkerSize (.5), Border (null). Are there some other properties which could be set to help?

2. Fixed the physical size of the chart: smaller seems to be better

3. We are rendering in the PrePaint: Should we use PostPaint? Does it matter?

Can we make use of chart.CreateGraphics? Are there some other things we can do to help the performance as the chart size and/or data points increase?

Thanks!

Link to comment
Share on other sites

The main question here is what's taking the long time. Is it your own code in the Prepaint Event or is it painting the chart?

If it is your code then it is up to you to improve that performance.

If it is the chart drawing that's taking a long time please provide more details or better a repro case that we can run here to verify and give you ideas to improve.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...