Fast Updating Histogram

Dear Rooters,

I am trying to draw a long trace with many signals in it with high update rate.
Please have a look at the attached Macro. It contains a macor wich creates a Signaltrace and draws it using a Histogram. The trace consists of 1 Million Points. To fill the Histogram with these points the program needs less than a second. But to draw the Histogram, the program needs ~10s. Is there a way to improve the speed of the drawing process? Or do I have to use another way of drawing?
In the end I’d like to have a Oszilloskop like Display which might have even more than a Million Points in it. The Display should update at least with ~5 Hz. Is this possible using ROOT?

ROOT Version: 5.18gdk
System: Windows XP Prof.

Thank you,
Lutz
TestFastUpdate.zip (4.41 KB)

This version is about 20 times faster but still a factor 2 slower that what you want.

Rene
MyTraceViewer.cpp (1.92 KB)
MyTraceViewer.h (565 Bytes)

Dear Rene,

after testing your version, it seems to me that one of the most important changes for speeding things up is the absence of the markers.
Unfortunatly these markers are very crucial for my implementation as they represent the measured Datapoints. The line connecting the Datapoints is just used to guide the eye.

I was wondering wether there is a simple way to use the TCanvas::SetDoubleBuffer(0) mode of the canvas to speed up the drawing of a Histogram or a Graph.

Thank you,
Lutz