SVG opacity versus fill-opacity performance

40 views Asked by At

Why fill-opacity is better performance than opacity?

I have a gridmap look like this https://codesandbox.io/s/github/holtzy/react-graph-gallery/tree/main/viz/HeatmapVaccination?from-embed

When I try to add opacity to (<rect opacity=0.6), the performance is really bad. But I fixed it by use fill-opacity, I do some reasearch but still don't understand, can anyone explain me what's the magic here?

0

There are 0 answers