-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark: add squoosh-cli #2643
Comments
From my usage of both squoosh.app & Squoosh-cli is the CLI feels more like a more crippled & poorly documented version of the app. EG I'm testing out the AVIF output, & didn't see lossless in the CLI but there was a checkbox in the app. Also Squoosh.app 'Effort' is 0=fastest, MAX(7-10, depends)=smallest, but I think your 'speed' is 0=smallest, 8=fastest. I should give you some of the test images I created to help test color shifting. |
It might be better to benchmark @squoosh/lib instead of |
It's probably worth including both. Using the "lib" variant of Squoosh removes any spawning overhead but with it brings GPLv3 code into the same process as |
squoosh/lib is definitely faster that its CLI, perhaps 60-70%, perhaps as the WASM files don't have to be compiled on each invocation. It is still ~17x slower than sharp for a "typical" JPEG decode/resize/encode roundtrip. These modules are now included in the performance test results - see https://sharp.pixelplumbing.com/performance - remember that squoosh/lib contains GPLv3 logic so any code that runs in the same Node.js process should also be considered GPLv3. Again it's very likely there'll be something needed to improve in the benchmark code and ensure a fair comparison - PRs to make it so are welcome, as always. |
https://www.npmjs.com/package/@squoosh/cli
I've created a work-in-progress branch to track this at bench-add-squoosh, e.g. commit 11720ab
It's very likely there are incorrect or missing settings that prevent the tests being a fair comparison so feedback/improvements are welcome. It does have to invoke a new process, which will have an overhead.
Some very early, initial testing suggests squoosh-cli is faster than jimp, but ~6x slower than GraphicsMagick (also invokes a new process) and ~25x slower than sharp.
The text was updated successfully, but these errors were encountered: