From 16e20b32acdfc6b68471802bbdfa4c42c64f65f7 Mon Sep 17 00:00:00 2001 From: Reizner Evgeniy Date: Mon, 5 Jun 2017 19:27:58 +0300 Subject: [PATCH] Version bump. --- CHANGELOG.md | 7 ++- Cargo.lock | 2 +- Cargo.toml | 8 +-- README.md | 12 ++-- ...correctness_chart_W3C_SVG_11_TestSuite.svg | 52 ++++++++--------- docs/images/correctness_chart_oxygen.svg | 58 +++++++++---------- ...performance_chart_W3C_SVG_11_TestSuite.svg | 54 ++++++++--------- docs/images/performance_chart_oxygen.svg | 54 ++++++++--------- .../ratio_chart_W3C_SVG_11_TestSuite.svg | 22 +++---- docs/images/ratio_chart_oxygen.svg | 20 +++---- docs/testing_notes.rst | 3 +- src/cli.rs | 2 +- ...orrectness_chart_W3C_SVG_11_TestSuite.json | 4 +- .../stats/data/correctness_chart_oxygen.json | 6 +- ...erformance_chart_W3C_SVG_11_TestSuite.json | 10 ++-- .../stats/data/performance_chart_oxygen.json | 10 ++-- .../ratio_chart_W3C_SVG_11_TestSuite.json | 10 ++-- tools/stats/data/ratio_chart_oxygen.json | 10 ++-- tools/stats/src/main.rs | 4 +- 19 files changed, 175 insertions(+), 173 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d27758e..1b7f8f62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] + +## [0.9.0] - 2017-06-05 ### Added - XML nodes can be indented with tabs now. Using `--indent=tabs`. - Presentational attributes joining can be forced with `--join-style-attributes=all` now. @@ -13,8 +15,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - `--apply-transform-to-paths`. - `--allow-bigger-file`. - `--coordinates-precision`. -- `--transforms-precision`. - `--properties-precision`. +- `--transforms-precision`. - Better groups with transforms ungrouping. - `--remove-text-attributes` removes `line-height` and `xml:space` now. - Some algorithms are moved to the `svgdom` crate. @@ -223,7 +225,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - First public release with Perl backend and Qt GUI. -[Unreleased]: https://github.com/RazrFalcon/svgcleaner/compare/v0.8.1...HEAD +[Unreleased]: https://github.com/RazrFalcon/svgcleaner/compare/v0.9.0...HEAD +[0.9.0]: https://github.com/RazrFalcon/svgcleaner/compare/v0.8.1...v0.9.0 [0.8.1]: https://github.com/RazrFalcon/svgcleaner/compare/v0.8.0...v0.8.1 [0.8.0]: https://github.com/RazrFalcon/svgcleaner/compare/v0.7.1...v0.8.0 [0.7.1]: https://github.com/RazrFalcon/svgcleaner/compare/v0.7.0...v0.7.1 diff --git a/Cargo.lock b/Cargo.lock index 44a732ce..c21e1130 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "svgcleaner" -version = "0.8.1" +version = "0.9.0" dependencies = [ "clap 2.24.1 (registry+https://github.com/rust-lang/crates.io-index)", "svgdom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 1a57e4d3..163b89ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "svgcleaner" -version = "0.8.1" +version = "0.9.0" authors = ["Evgeniy Reizner "] keywords = ["svg", "cleaner", "optimizer"] license = "GPL-2.0" @@ -42,6 +42,6 @@ cli-parsing = ["clap"] # makes it 5-10% faster, but very slow to compile # use only for main releases -# [profile.release] -# opt-level = 3 -# lto = true +[profile.release] +opt-level = 3 +lto = true diff --git a/README.md b/README.md index 1c20a54f..09e476ea 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ All stats were collected using the latest release version. *Less is better.* -![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.8.1/docs/images/correctness_chart_W3C_SVG_11_TestSuite.svg) +![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.9.0/docs/images/correctness_chart_W3C_SVG_11_TestSuite.svg) \* Most of the errors were due to incorrect `font-face` processing. Without including font-based errors, scores were: - `svgo`: 100 @@ -74,7 +74,7 @@ All stats were collected using the latest release version. *** -![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.8.1/docs/images/correctness_chart_oxygen.svg) +![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.9.0/docs/images/correctness_chart_oxygen.svg) \* Errors produced by numeric rounding were ignored. @@ -82,21 +82,21 @@ All stats were collected using the latest release version. *More is better.* -![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.8.1/docs/images/ratio_chart_W3C_SVG_11_TestSuite.svg) +![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.9.0/docs/images/ratio_chart_W3C_SVG_11_TestSuite.svg) \* Note that `svgo` and `scour` break most of the files. *** -![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.8.1/docs/images/ratio_chart_oxygen.svg) +![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.9.0/docs/images/ratio_chart_oxygen.svg) ### Cleaning time *Less is better.* -![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.8.1/docs/images/performance_chart_W3C_SVG_11_TestSuite.svg) +![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.9.0/docs/images/performance_chart_W3C_SVG_11_TestSuite.svg) -![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.8.1/docs/images/performance_chart_oxygen.svg) +![Alt text](https://cdn.rawgit.com/RazrFalcon/svgcleaner/v0.9.0/docs/images/performance_chart_oxygen.svg) ### Other diff --git a/docs/images/correctness_chart_W3C_SVG_11_TestSuite.svg b/docs/images/correctness_chart_W3C_SVG_11_TestSuite.svg index b4701ee1..86421445 100644 --- a/docs/images/correctness_chart_W3C_SVG_11_TestSuite.svg +++ b/docs/images/correctness_chart_W3C_SVG_11_TestSuite.svg @@ -1,57 +1,57 @@ - - + + Broken files in W3C SVG 1.1 TestSuite - svgcleaner 0.8.1 + svgcleaner 0.9.0 - svgo 0.7.1 + svgo 0.7.2 - + scour 0.35 - - + + 0 - - + + 100 - - + + 200 - - + + 300 - - + + 400 - - + + 525 - - - + + + 1 - - + + 284 - - + + 269 - - + + Files diff --git a/docs/images/correctness_chart_oxygen.svg b/docs/images/correctness_chart_oxygen.svg index 2450c011..fbb1177e 100644 --- a/docs/images/correctness_chart_oxygen.svg +++ b/docs/images/correctness_chart_oxygen.svg @@ -1,59 +1,59 @@ - - + + Broken files in Oxygen icon theme - svgcleaner 0.8.1 + svgcleaner 0.9.0 - svgo 0.7.1 + svgo 0.7.2 - + scour 0.35 - - + + 0 - - + + 1000 - - + + 2000 - - + + 3000 - - + + 4000 - - + + 4941 - - - + + + 1 - - - - 182 + + + + 184 - - - + + + 8 - - + + Files diff --git a/docs/images/performance_chart_W3C_SVG_11_TestSuite.svg b/docs/images/performance_chart_W3C_SVG_11_TestSuite.svg index b5952334..92c9fa24 100644 --- a/docs/images/performance_chart_W3C_SVG_11_TestSuite.svg +++ b/docs/images/performance_chart_W3C_SVG_11_TestSuite.svg @@ -1,53 +1,53 @@ - - + + Average cleaning time in W3C SVG 1.1 TestSuite - svgcleaner 0.8.1 + svgcleaner 0.9.0 - svgo 0.7.1 + svgo 0.7.2 - + scour 0.35 - - + + 0ms - - + + 60ms - - + + 120ms - - + + 180ms - - + + 240ms - - - - 1.575 + + + + 1.6 - - - 215.327 + + + 215 - - - 137.773 + + + 137 - - + + Time diff --git a/docs/images/performance_chart_oxygen.svg b/docs/images/performance_chart_oxygen.svg index 4fb144f8..2d3c4d9d 100644 --- a/docs/images/performance_chart_oxygen.svg +++ b/docs/images/performance_chart_oxygen.svg @@ -1,53 +1,53 @@ - - + + Average cleaning time in Oxygen icon theme - svgcleaner 0.8.1 + svgcleaner 0.9.0 - svgo 0.7.1 + svgo 0.7.2 - + scour 0.35 - - + + 0ms - - + + 600ms - - + + 1200ms - - + + 1800ms - - + + 2400ms - - - - 7.567 + + + + 9 - - - 687.752 + + + 687 - - - 2216.091 + + + 2216 - - + + Time diff --git a/docs/images/ratio_chart_W3C_SVG_11_TestSuite.svg b/docs/images/ratio_chart_W3C_SVG_11_TestSuite.svg index e6b98491..e3f777bd 100644 --- a/docs/images/ratio_chart_W3C_SVG_11_TestSuite.svg +++ b/docs/images/ratio_chart_W3C_SVG_11_TestSuite.svg @@ -4,14 +4,14 @@ Cleaning ratio in W3C SVG 1.1 TestSuite - - svgcleaner 0.8.1 + + svgcleaner 0.9.0 - - svgcleaner 0.8.0 + + svgcleaner 0.8.1 - - svgo 0.7.1 + + svgo 0.7.2 scour 0.35 @@ -36,17 +36,17 @@ 100% - - - 32.75 + + + 32.87 - 32.74 + 32.75 - 40.77 + 40.76 diff --git a/docs/images/ratio_chart_oxygen.svg b/docs/images/ratio_chart_oxygen.svg index 607ccb83..866de079 100644 --- a/docs/images/ratio_chart_oxygen.svg +++ b/docs/images/ratio_chart_oxygen.svg @@ -4,14 +4,14 @@ Cleaning ratio in Oxygen icon theme - - svgcleaner 0.8.1 + + svgcleaner 0.9.0 - - svgcleaner 0.8.0 + + svgcleaner 0.8.1 - - svgo 0.7.1 + + svgo 0.7.2 scour 0.35 @@ -36,13 +36,13 @@ 100% - - - 61.12 + + + 61.25 - 61.08 + 61.12 diff --git a/docs/testing_notes.rst b/docs/testing_notes.rst index c80bd3b9..89035e8b 100644 --- a/docs/testing_notes.rst +++ b/docs/testing_notes.rst @@ -77,8 +77,7 @@ Notes - I know that a performance comparison is not fair since ``svgo`` have to restart ``node.js`` each time. But I don't know how to prevent it or ignore ``node.js`` starting time. - Cleaners options can be found [here](../tools/stats/src/main.rs). -- Used ``node.js``: ``net-libs/nodejs-7.3.0(icu npm snapshot ssl -debug -doc -test - CPU_FLAGS_X86="sse2" PYTHON_TARGETS="python2_7")``. +- Used ``node.js``: ``7.10.0(icu npm snapshot ssl -debug -doc -systemtap -test CPU_FLAGS_X86="sse2" PYTHON_TARGETS="python2_7")``. - You can find links to the data sets `here <../tools/files-testing/README.md>`_. - You can repeat tests by yourself using `stats <../tools/stats>`_ app. diff --git a/src/cli.rs b/src/cli.rs index 297c7a5b..f6118f17 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -202,7 +202,7 @@ pub fn prepare_app<'a, 'b>() -> App<'a, 'b> { App::new("svgcleaner") .help(include_str!("../data/help.txt")) - .version("0.8.1") + .version("0.9.0") .arg(Arg::with_name("in-file") .required(true) .index(1) diff --git a/tools/stats/data/correctness_chart_W3C_SVG_11_TestSuite.json b/tools/stats/data/correctness_chart_W3C_SVG_11_TestSuite.json index 6f413ff1..6c8aac55 100644 --- a/tools/stats/data/correctness_chart_W3C_SVG_11_TestSuite.json +++ b/tools/stats/data/correctness_chart_W3C_SVG_11_TestSuite.json @@ -6,11 +6,11 @@ }, "items": [ { - "name": "svgcleaner 0.8.1", + "name": "svgcleaner 0.9.0", "value": 1 }, { - "name": "svgo 0.7.1", + "name": "svgo 0.7.2", "value": 284 }, { diff --git a/tools/stats/data/correctness_chart_oxygen.json b/tools/stats/data/correctness_chart_oxygen.json index 20f997a2..02753e8f 100644 --- a/tools/stats/data/correctness_chart_oxygen.json +++ b/tools/stats/data/correctness_chart_oxygen.json @@ -6,12 +6,12 @@ }, "items": [ { - "name": "svgcleaner 0.8.1", + "name": "svgcleaner 0.9.0", "value": 1 }, { - "name": "svgo 0.7.1", - "value": 182 + "name": "svgo 0.7.2", + "value": 184 }, { "name": "scour 0.35", diff --git a/tools/stats/data/performance_chart_W3C_SVG_11_TestSuite.json b/tools/stats/data/performance_chart_W3C_SVG_11_TestSuite.json index 79fc388f..89d18ee4 100644 --- a/tools/stats/data/performance_chart_W3C_SVG_11_TestSuite.json +++ b/tools/stats/data/performance_chart_W3C_SVG_11_TestSuite.json @@ -6,16 +6,16 @@ }, "items": [ { - "name": "svgcleaner 0.8.1", - "value": 1.575 + "name": "svgcleaner 0.9.0", + "value": 1.6 }, { - "name": "svgo 0.7.1", - "value": 215.327 + "name": "svgo 0.7.2", + "value": 215 }, { "name": "scour 0.35", - "value": 137.773 + "value": 137 } ], "hor_axis": { diff --git a/tools/stats/data/performance_chart_oxygen.json b/tools/stats/data/performance_chart_oxygen.json index c37597ba..48cc2d7b 100644 --- a/tools/stats/data/performance_chart_oxygen.json +++ b/tools/stats/data/performance_chart_oxygen.json @@ -6,16 +6,16 @@ }, "items": [ { - "name": "svgcleaner 0.8.1", - "value": 7.567 + "name": "svgcleaner 0.9.0", + "value": 9 }, { - "name": "svgo 0.7.1", - "value": 687.752 + "name": "svgo 0.7.2", + "value": 687 }, { "name": "scour 0.35", - "value": 2216.091 + "value": 2216 } ], "hor_axis": { diff --git a/tools/stats/data/ratio_chart_W3C_SVG_11_TestSuite.json b/tools/stats/data/ratio_chart_W3C_SVG_11_TestSuite.json index 49149644..5803596a 100644 --- a/tools/stats/data/ratio_chart_W3C_SVG_11_TestSuite.json +++ b/tools/stats/data/ratio_chart_W3C_SVG_11_TestSuite.json @@ -6,16 +6,16 @@ }, "items": [ { - "name": "svgcleaner 0.8.1", + "name": "svgcleaner 0.9.0", "value": 32.87 }, { - "name": "svgcleaner 0.8.0", - "value": 32.74 + "name": "svgcleaner 0.8.1", + "value": 32.75 }, { - "name": "svgo 0.7.1", - "value": 40.77 + "name": "svgo 0.7.2", + "value": 40.76 }, { "name": "scour 0.35", diff --git a/tools/stats/data/ratio_chart_oxygen.json b/tools/stats/data/ratio_chart_oxygen.json index 0b1644b6..738f7b3d 100644 --- a/tools/stats/data/ratio_chart_oxygen.json +++ b/tools/stats/data/ratio_chart_oxygen.json @@ -6,15 +6,15 @@ }, "items": [ { - "name": "svgcleaner 0.8.1", - "value": 61.19 + "name": "svgcleaner 0.9.0", + "value": 61.25 }, { - "name": "svgcleaner 0.8.0", - "value": 61.08 + "name": "svgcleaner 0.8.1", + "value": 61.12 }, { - "name": "svgo 0.7.1", + "name": "svgo 0.7.2", "value": 53.33 }, { diff --git a/tools/stats/src/main.rs b/tools/stats/src/main.rs index 9de85a62..3dfe4321 100644 --- a/tools/stats/src/main.rs +++ b/tools/stats/src/main.rs @@ -200,8 +200,6 @@ fn collect_stats(data: &Data, input_dir: &str, cleaner: Cleaner) -> TotalStats { } idx += 1; - - // break; } total_stats @@ -253,6 +251,7 @@ fn file_stats(data: &Data, svg_path: &Path, cleaner: &Cleaner) -> FileStats { let orig_png_path_str = orig_png_path.to_str().unwrap(); if !orig_png_path.exists() { if !render_svg(&data.render_path.unwrap(), svg_path_str, orig_png_path_str) { + fs::remove_file(&new_svg_path).unwrap(); return stats; } } @@ -267,6 +266,7 @@ fn file_stats(data: &Data, svg_path: &Path, cleaner: &Cleaner) -> FileStats { let new_png_path_str = new_png_path.to_str().unwrap(); if !render_svg(&data.render_path.unwrap(), new_svg_path_str, new_png_path_str) { fs::remove_file(&new_svg_path).unwrap(); + fs::remove_file(&orig_png_path).unwrap(); return stats; }