v3.2.0
What's Changed
Bug Fixes
- convertPathData, fix instances were
qwas incorrectly converted tot. By @KTibow in https://github.com/svg/svgo/pull/1889 - convertTransform, fix for some transforms that weren't being converted correctly. By @SethFalco in https://github.com/svg/svgo/pull/1916
SVG Optimization
- convertPathData, improves closing paths and how we determine if to use absolute or relative commands. By @KTibow in https://github.com/svg/svgo/pull/1867
- convertPathData, round arc or convert to lines based on the sagitta, can be disabled by setting
smartArcRoundingtofalse. By @KTibow in https://github.com/svg/svgo/pull/1873 - convertPathData, convert cubic Bézier curves to quadratic Bézier curves where possible, can be disabled by setting
convertToQtofalse. By @KTibow in https://github.com/svg/svgo/pull/1889
Performance
- mergePaths, refactor for performance with large files. By @mozzie in https://github.com/svg/svgo/pull/1764 and https://github.com/svg/svgo/pull/1904
- convertPathData, refactor
#stringifyPathDatafor performance. By @SethFalco in https://github.com/svg/svgo/pull/1900 - Use
Setinstead ofArrayfor faster lookups. By @SethFalco in https://github.com/svg/svgo/pull/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 |