It seems that applying a filter to shapes drastically impacts performance while panning or zooming. Seems to really be noticeable when multiple shapes have a filter, about a dozen or so. Yet even when there are hundreds of shapes the performance is just fine as long as none of them have a filter. I've recreated the behavior in the pen linked below.
Expected behaviour
Performance has no noticeable difference between using and not using a filter on a shape
Actual behaviour
Performance is noticeably slower when using a filter and is drastically slower if the filter is used on multiple shapes
Steps to reproduce the behaviour
Create an SVG with about a dozen or so shapes like <circle>
Define a filter like <filter id="drop-shadow"><feDropShadow dx="0.2" dy="0.4" stdDeviation="0.2" /></filter>
Toggle adding it to the shapes with CSS filter: url(#drop-shadow)
Pan and zoom while a filter is applied vs. while it is not
Bug report
It seems that applying a
filter
to shapes drastically impacts performance while panning or zooming. Seems to really be noticeable when multiple shapes have a filter, about a dozen or so. Yet even when there are hundreds of shapes the performance is just fine as long as none of them have a filter. I've recreated the behavior in the pen linked below.Expected behaviour
Performance has no noticeable difference between using and not using a
filter
on a shapeActual behaviour
Performance is noticeably slower when using a filter and is drastically slower if the filter is used on multiple shapes
Steps to reproduce the behaviour
<circle>
<filter id="drop-shadow"><feDropShadow dx="0.2" dy="0.4" stdDeviation="0.2" /></filter>
filter: url(#drop-shadow)
Configuration
3.6.1
Chrome
MacOS