-
Notifications
You must be signed in to change notification settings - Fork 43
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
Performance improvements #68
Comments
Hello, I've just started investigating use of this rather handy module and spotted the following comment:
Did you see the limitInputPixels option? The following should be suitable for resizing large screenshots: const png = await sharp(input)
.limitInputPixels(false)
.resize(width, height)
.png({ adaptiveFiltering: false })
.toBuffer(); |
Ah OK, didn't know that. Just saw some issues about this limit and the docs are also mentioning this limit. But would be really cool if this works. |
Ah, that is a most excellent point about the ambiguity of the docs, thank you. I'll attempt to make things clearer these are modifiable defaults. EDIT: There are currently output limits, soon to be made more relevant to the specific output format - see lovell/sharp#176 |
FYI sharp v0.18+ now has a per-format limit, so for PNG it should be 32bit |
There are some things that we can improve to get more screens in time. The goal is to reduce browser idle times as much as possible as the browser is the bottleneck and should theoretically never idle.
There are some optimizations that are safe to do (without breaking browser screenshots):
And some others need further researches or additional/manual tests to avoid errors:
The text was updated successfully, but these errors were encountered: