Loading a huge image (5mb) into svg background leads to pixelation and performance issues

后端 未结 2 858
有刺的猬
有刺的猬 2021-01-20 07:48

I have some issues with pixelation and the performance of SVG background images together with D3.js.

You can already see a running

2条回答
  •  情深已故
    2021-01-20 08:00

    I don't really understand your question but performance wise if you have deep hierarchy tree in SVG, you should consider using html5 canvas instead since it's much more performance efficient. It feels from your question that's the main issue. Maybe it's not the best solution for you but I think you should read up on what best suits you. See https://msdn.microsoft.com/en-us/hh552482.aspx?f=255&MSPPError=-2147217396 and http://www.sitepoint.com/7-reasons-to-consider-svgs-instead-of-canvas/ for pros and cons between SVG and canvas. Microsoft Virtual Academy also has a chapter for this as well.

    Hope it helps!

提交回复
热议问题