Maximum Data File Size for D3.js

心已入冬 提交于 2019-11-30 21:50:14

There are three limiting factors when working with large amounts of data:

  • The size of the file to load and the connection speed of the server/client.
  • The processing to be done on the data.
  • The rendering of the visual elements representing the data.

Without more details on your application, it's hard to guess which one it is, but in my experience it is almost always the third. The rendering of the elements usually takes most of the time it takes to display a visualisation.

The debug/web development tools in your browser should give you a better idea of where the bottleneck is; in particular you should be able to find out quite easily how long it takes to load the JSON. If that is significantly shorter than the time to display the visualisation, the problem is almost certainly the rendering of the elements.

In this case, there are two main things you can do. You can either reduce the number of elements shown (e.g. by aggregating), or switch to a different rendering mechanism. In particular, canvas renders significantly faster than SVG. If you make that switch, you lose the interactivity that SVG makes quite easy, so it's a tradeoff that depends on your particular application.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!