Mobile app version of vmapp.org
Login or Join
Lee3735518

: What are the main performance issues in svg? What are the main performance issues in svg? Out of filters, gradients , blurs, text rendering , clipping, transformations , etc, what takes the

@Lee3735518

Posted in: #Svg

What are the main performance issues in svg? Out of filters, gradients , blurs, text rendering , clipping, transformations , etc, what takes the most resources to render?

In particular, is it faster to replace transformations by modifying coordinate values directly (i.e. "bake" transformations)?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Lee3735518

1 Comments

Sorted by latest first Latest Oldest Best

 

@Cugini998

Because the subject is so big lets scope it so that we only consider the transformations.

In essence a transformation in this case is a 2x2 matrix paired with a 1x2 vector that is 6 numbers. Certainly the 3 lower matrix items could be considered but thats not the case in svg so we can slightly optimize stuff. Since the matrices can be concatenated each transform adds just adds 10 operations no matter how many points your shape has.

Since the shape that has no transform still needs to be transformed (ok so this can be optimized. But then coordinates can be cached by the system as well. This is implementation detail we can not know) the initial transform most likely is a no operation in terms of speed.

So all in all adding 10 transforms adds roughly 100 operations, it may be less if the computer optimizes things. Since a samsung galaxy S2 does about 400 million of these operations a second I would say no matter (even if you would have one in 100 overhead still shouldn't matter). Especially if you animate the transformation you only gain speed because there is less data to update.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme