-
-
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
Proposed v0.28.0 "bijou" release: smaller binaries, faster processing, more ARM64, integrated mozjpeg+pngquant #2604
Comments
Exciting news :) I just want to let you know that if you need any help or simply testing with Intel/M1 macs, I'd be glad to help. |
Really excited about replacing libaom with dav1d and rav1e. |
This comment has been minimized.
This comment has been minimized.
The first pre-release of v0.28.0 is now available for some early testing:
Notes:
This pre-release uses ~1/3rd less disk space than v0.27.2, e.g. here's Linux x64:
|
Can't seem to get Sharp running on M1. Tried this using M1, getting an issue:
package.json:
Tried: |
@SaviourSelf The message |
The (first and hopefully only) v0.28.0 beta release is now available. It would be especially great if those with Apple M1 devices are able to help test this: npm install lovell/sharp#v0.28.0-beta1 Notes:
|
Clean M1 Mac test:
I also tested it also in a Ubuntu20.04 container ( nvidia/cuda:11.1.1-cudnn8-runtime-ubuntu20.04 ), it failed using either of these commands:
Current version of sharp installs in the container without issue. NPM output log
0 verbose cli [ |
@mikeburgh Thank you very much for testing.
This is the expected behaviour. Prebuilt darwin-arm64v8 binaries will be provided for libvips but not sharp. This will be documented - see https://github.com/lovell/sharp/blob/bijou/docs/install.md#apple-m1 The Linux problem looks like it might be an npm v7 permissions thing. You mentioned Ubuntu 20.04 but the appearance of "Linux 5.10.21-Unraid" suggests this could be some kind of NAS device? If attempting to install a known-good tag e.g. |
@lovell On the M1, figured the command tools would be required, just wanted to give you full results from a clean machine. With linux, yes the container runs inside an Unraid machine (https://unraid.net/), however installing prior versions work, which is why I raised it: npm install lovell/sharp#v0.27.2:
|
@mikeburgh I've tried using Node.js 14 installed via nvm in a clean Ubuntu 20.04 container and sharp v0.28.0-beta1 installs (from GitHub) correctly. If this problem persists on your specific machine after sharp v0.28.0 is published to npm, we can work out what's wrong in a new issue.
Inside the container:
|
v0.28.0 is now available, thanks for everyone's help, please open a new issue for any problems. As well as the performance improvements and added features of mozjpeg and pngquant, filesystem usage has been reduced by 30% (12MB) and we have identified further, future possible savings. $ npm install [email protected]
$ du -sh node_modules/
26M node_modules/ If you work at an organisation that benefits commercially from sharp and libvips, please consider a donation to https://opencollective.com/libvips as we're looking for financial help to cover paid summer internships. |
@lovell yeah, what ever was up with it in my container, it's fine via the 0.28.0 release! Thanks for the great updates in this release! |
Due to a small administrative error on my part, the just-published v0.28.1 contains the complete set of filesystem savings that should have been part of v0.28.0. https://packagephobia.com/result?p=sharp reports that v0.28.1 has an install size of 23MB. |
This is a meta-issue to track the many improvements that are planned/proposed for the forthcoming v0.28.0 of sharp.
The release date is very much to be determined; please don't ask.
Smaller install footprint, faster install time
The latest version of sharp v0.27.2 occupies 38MB of disk space, a figure that has been creeping up recently, especially with the addition of AVIF support via libaom.
For sharp v0.28.0, the plan is to approximately halve this to around 20MB of disk space.
Changes to prebuilt binaries:
-Os
) where libvips' use of them does not benefit from performance (-O3
)For AVIF de/compression, replace libaom with the smaller and slightly faster dav1d+rav1e comboThis is not straightforward, so now being tracked at Experiment: consider switching from aom to dav1d+rav1e/svt-av1 sharp-libvips#97
Changes to npm dependency tree:
array-flatten
dependency with[].concat(...arr)
simple-get
dependency to v3.1.0 for de-duping withprebuild-install
npmlog
dependency withconsole.log
/error
Faster processing
Changes to prebuilt binaries:
Improve ARM64 support
ARM64 is currently supported on modern glibc-based Linux such as Raspberry Pi OS. The aim is to expand the provision of binaries for more aarch64 platforms:
Optimise output
It's quite common for packages that depend on
sharp
to also depend onimagemin
forimagemin-mozjpeg
andimagemin-pngquant
, which can lead to an inefficient two stage process.Changes to prebuilt binaries:
Supporting improvements to API and documentation:
This will allow access to the features of mozjpeg and pngquant as part of your existing sharp image processing pipelines without the need to install further dependencies or spawn child processes.
The text was updated successfully, but these errors were encountered: