views:

25

answers:

2

I know that Web Workers don't have access to the DOM, but I was wondering if there was any way they could render a Sparkline graph behind the scenes and pass it back. If not, is there ANY way I could use Web Workers to speed up the processing of around a million sparklines?

I'm trying to improve performance (see this question)

+1  A: 

If you look at this article: http://hacks.mozilla.org/2009/07/working-smarter-not-harder/ you can just pass back the points to be graphed (x,y coordinates) and then when you post the message the receiving end will just need to process it (graph it).

So, your performance hit will be in the rendering of each graph, if you profile your application that will be the part that becomes the bottleneck.

James Black
A: 

Why render them on the client side anyway? Try the Google Chart API http://code.google.com/apis/chart/docs/gallery/line_charts.html.

SimpleCoder
tried that. too slow, and doesn't get small enough. i need 18x18 graphs. google charts only goes down to 32x64
Jason
we're talking thousands of these badboys. not just 10 or 20
Jason