Skip to content
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

Optimize quality and performance #2

Closed
jstcki opened this issue Jan 22, 2016 · 8 comments
Closed

Optimize quality and performance #2

jstcki opened this issue Jan 22, 2016 · 8 comments

Comments

@jstcki
Copy link
Contributor

jstcki commented Jan 22, 2016

JIMP is pretty neat because it doesn't depend on some binary (makes it easy to run anywhere) but performance degrades quickly with many images.

Also, the resized image quality could be better (noticeable when scaling down 1px lines in transparent PNGs).

These problems could potentially be remedied with using another library/binary. Maybe add a configuration option for the 'engine'.

@jstcki
Copy link
Contributor Author

jstcki commented Jan 22, 2016

@jstcki
Copy link
Contributor Author

jstcki commented May 17, 2016

JIMP now actually supports different resizing algorithms: https://github.com/oliver-moran/jimp#resize-modes

@gabrielbull
Copy link

gabrielbull commented Oct 29, 2016

Yeah, performance goes down the drain as soon as you use this library in a real world scenario. I added a few images already the dev server takes 20x as long to boot up, I'm afraid to add anymore image.

  1. Is there a way for a loader to do on demand loading when running the web pack dev server or do all images need to be processed before web pack can run?
  2. Can we implement caching between dev server sessions to reduce that boot time?

@sidonaldson
Copy link

I've had to pull this from my project as it's killing the build. I have about 30 large jpgs that it tries to generate srcset for and it just hangs. Sadly unusable in production at this time. Shame as it's the better one

@jstcki
Copy link
Contributor Author

jstcki commented Nov 14, 2016

Yeah, probably a sharp "adapter" would be quite useful. Any thoughts on if this should be optional (use sharp when it's present, otherwise fall back to JIMP) or if we just should drop JIMP because it's too slow in practice?

@sidonaldson how large are your JPGs?

FWIW, we use it in production to generate ~200 regular sized JPGs and PNGs, and the build takes around 5min on Codeship (including all other assets).

@langri-sha
Copy link

langri-sha commented Dec 13, 2016

👍 for retaining JIMP, for future users which would like to run Webpack compilations in the browser and use responsive-loader there.

@langri-sha
Copy link

I have a dirty WIP branch that's using sharp in case anyone wants to test https://github.com/langri-sha/responsive-loader/tree/sharp. I have about 50mb of images being processed and on my Intel m5 it used to take about 4 minutes with jimp and now it's down to ~15s.

Travis CI will need some tweaking to get sharp built inside their node-js container.

@jstcki
Copy link
Contributor Author

jstcki commented Jul 10, 2017

Closed via #29

@jstcki jstcki closed this as completed Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants