I see. Hm, but the Graphics' performance appears poor even without clearing in my case... What I do is: draw fresh lines for the current tick; graphics.position -= step. And apparently changing the position of a Graphics object big enough takes too much CPU time for some reason.
Hm. In fact I'm currently using only two. One is for the axis and one for all the plotted lines on the chart. I'm thinking maybe I should use a separate Graphics for every line, but I haven't tried yet (would take some time to implement)
that's the point. For example imagine I draw 30 "microlines" on every tick, say 10 times per second. What you're suggesting (draw graphics one time a leave it alone) would mean I'll have a huge number of Graphics objects: 30 10 <seconds passed> Currently I only have one Graphics object that draws all the lines.
wow the parser ate my asterisks. I meant: 30 x 10 x <seconds passed>
I just realized. I don't have WebGL running because of a poor driver for my GPU in Linux. It explains a lot. Will update it and test again. Though I'd like to optimize Canvas-version perfomance as much as possible too.