javascript – Is the browser drawing what is outside of the SVG canvas?

Question:

I appeal to those who have already encountered. The question is this:

Does it make sense to cluster svg into square areas (grid) with links to objects in them to filter and then show only elements that fall into the scope ( display: none/block; )?

Or do browsers know how to do something like that themselves?

Thanks!

Answer:

The scope is called Viewport and it is set by declaring the size of the main handle:

<svg width="500px" height="300px"></svg>

I have not found official data on out-of-scope rendering, but private empirical research (by profiling) confirms that using display: none out of scope can significantly reduce the amount of resources used.

Scroll to Top