1

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)

4

2 回答 2

1

如果你看这篇文章:http ://hacks.mozilla.org/2009/07/working-smarter-not-harder/你可以传回要绘制的点(x,y坐标),然后当你发布接收端只需要处理它(绘制它)的消息。

因此,如果您分析将成为瓶颈的部分的应用程序,您的性能影响将出现在每个图形的渲染中。

于 2010-07-10T00:44:35.190 回答
0

为什么要在客户端渲染它们呢?试试 Google Chart API http://code.google.com/apis/chart/docs/gallery/line_charts.html

于 2010-07-10T00:46:36.150 回答