|The stupid question is the question not asked|
Real time data graphs.by enhering (Sexton)
|on Oct 07, 2006 at 17:28 UTC||Need Help??|
enhering has asked for the
wisdom of the Perl Monks concerning the following question:
Hi. I'm building a data aquisition system in Perl that colects data at the rate of 10 cicles per second, and I'd like to show that in a graph on a Tk window.
If I use Tk::Canvas and create boxes or dots for each aquired data point, soon I'll fill all the memory because, if I understood correctly, each of those points is an entity on Tk.
Using Imager with Tk::photo was tried too, but the convertion from Imager format to PNG, as stated on Tk::Photo example, using base64 takes too long.
GD was also tried, but we need more functionality for the generated graphics.
In fact, what I'm looking for is a suggestion of a way to draw primitives on a canvas that are not items or objects, as was done in the past on VGA screens. The Tk::Photo + Imager solution would be fine if the conversion did not take so long.
Can you suggest me a way of solving this problem?
The following piece of code examples the problem. In a athlon64 notebook it takes 70% of the CPU to run.