vgo
vgo copied to clipboard
Avoid Android Lint's [VectorPath] warning
Error: Very long vector path (n characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector. [VectorPath]
There's a certain length path, n, that we should treat as a maximum. By default vgo should:
- Split long paths when converting an SVG into a VD
- Avoid merging paths that will exceed n characters.
Opting out of this behavior may be a good candidate for a rule in the configuration language (#21). It has the potential to make the overall file more compact at the cost of a few milliseconds of rendering work.
https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/VectorPathDetector.java;l=90
This seems reasonable given the arbitrary length choice and that it was made a while ago. https://issuetracker.google.com/issues/37136968#comment6