c# – How to properly process and draw a large amount of data?


Good afternoon.

Given a set of points (100.000-500.000). The points form curves (waves) that are displayed on the graph. Chart example

Now the program works in the following sequence:

  1. Reading points from a file
  2. Creating a bitmap
  3. Convert point values ​​to bitmap coordinates
  4. Writing points to bitmap via Graphics.DrawCurve()
  5. If you need to paint over a part of the wave (for example, the positive part) – find the intersection area of ​​​​some areas through Region.Intersect and fill it.
  6. bitmap drawing

The program is running slowly.

  1. Is GDI+ suitable for displaying large amounts of data? Or should I use something else?
  2. What is the correct sequence of actions?
  3. What is the right way to convert values ​​to coordinates and at what point?
  4. What to read?

Thank you.


I can advise you to discard points that are not visible (superimposed on each other) due to the scale. There is a Douglas-Peker algorithm for this.

Scroll to Top