MAC 上的 HTML5 绘图库性能问题?
我正在研究绘制非常大的数据。我尝试过 FLOT、FLOTR 和 PROTOVIS(以及其他基于 JS 的软件包),但我一直面临一个问题。我已经在 1000w 500h 图表上测试了 1600、3000、5000、8000 和 10k 点,这些点都在 PC 浏览器(IE 和 FF)上的合理时间内呈现。但是,当在 MAC FF/Safari 上渲染时,从 500 个数据点开始,页面会变得明显缓慢和/或崩溃。
有人遇到过这个问题吗?
I am looking into plotting a very large data. I've tried with FLOT, FLOTR and PROTOVIS (and other JS based packages) but there is one constant problem I'm faced with. I've tested 1600, 3000, 5000, 8000 and 10k points on a 1000w 500h graph which are rendered all within a reasonable time on PC browsers (IE and FF). But when rendered on MACs FF/Safari, starting with 500 data points, the page becomes significantly slow and/or crashes.
Has anyone come across this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,不要这样做。在我看来,10k 点实际上不太可能对用户同时可见/有用。
您应该聚合数据(服务器端),然后如果他们想要放大数据区域,请使用 AJAX 请求来获取该区域并重新绘制。
如果您使用flot,他们有显示选择的示例,即这里: http://people .iola.dk/olau/flot/examples/zooming.html
Yes, don't do that. It seems pretty unlikely to me that 10k points are actually going to be visible/useful to the user all at once.
You should aggregate your data (server-side) and then if they want to zoom in on areas of the data, use AJAX requests to get that area and replot.
If you use flot, they have examples showing selection, i.e. here: http://people.iola.dk/olau/flot/examples/zooming.html
(我还不能评论 Ryley 的答案,这就是为什么我在这里发表一些评论)
离线使用怎么样。 Html 是一种很好的文档格式,抛开服务器/客户端的内容不谈。
JavaScript、Canvas 和所有这些奇特的客户端技术都可以用来构建漂亮的交互式文件,例如包含具有缩放和平移功能的图形的数据报告......
(I can't comment the Ryley answer yet, that's why I put some remarks here)
What about an offline use. Html is a great format for documents, set aside the server/client stuff.
JavaScript, Canvas and all those fancy client-side technologies could be used to build nice interactive files, like data reports containing graphs with zoom and pan features ...