v3.2.0
What's Changed
Bug Fixes
- convertPathData, fix instances were
q
was incorrectly converted tot
. By @KTibow in #1889 - convertTransform, fix for some transforms that weren't being converted correctly. By @SethFalco in #1916
SVG Optimization
- convertPathData, improves closing paths and how we determine if to use absolute or relative commands. By @KTibow in #1867
- convertPathData, round arc or convert to lines based on the sagitta, can be disabled by setting
smartArcRounding
tofalse
. By @KTibow in #1873 - convertPathData, convert cubic Bézier curves to quadratic Bézier curves where possible, can be disabled by setting
convertToQ
tofalse
. By @KTibow in #1889
Performance
- mergePaths, refactor for performance with large files. By @mozzie in #1764 and #1904
- convertPathData, refactor
#stringifyPathData
for performance. By @SethFalco in #1900 - Use
Set
instead ofArray
for faster lookups. By @SethFalco in #1899
Metrics
Before and after using vectors from various sources, with the default preset of each respective version:
SVG | Original | v3.1.0 | v3.2.0 | Delta |
---|---|---|---|---|
Arch Linux Logo | 9.529 KiB | 4.162 KiB | 4.115 KiB | ⬇️ 0.047 KiB |
Blobs | 50.45 KiB | 42.949 KiB | 42.623 KiB | ⬇️ 0.326 KiB |
Isometric Madness | 869.034 KiB | 550.153 KiB | 540.582 KiB | ⬇️ 9.571 KiB |
tldr-pages Banner | 2.071 KiB | 1.07 KiB | 1.07 KiB | |
Wikipedia Logo | 161.551 KiB | 116 KiB | 111.668 KiB | ⬇️ 4.332 KiB |
Before and after of the browser bundle of each respective version:
v3.1.0 | v3.2.0 | Delta | |
---|---|---|---|
svgo.browser.js | 660.9 kB | 910.9 kB | ⬆️ 250 kB |