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

Performance optimization #6

Open
1 of 7 tasks
IlCallo opened this issue Dec 12, 2019 · 4 comments
Open
1 of 7 tasks

Performance optimization #6

IlCallo opened this issue Dec 12, 2019 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@IlCallo
Copy link
Member

IlCallo commented Dec 12, 2019

  • Emit all files only at the end. Evaluate performance impact
  • Avoid emitting files which are never actually used (previous point)
  • Apply optimizations during image conversion in sharp converter for all possible formats
  • Add an option to strip metadata
  • Apply webpack performance optimizations to reduce build time
  • Decouple image optimization. Evaluate performance impact
  • Decouple size management, if possible
@IlCallo IlCallo added enhancement New feature or request help wanted Extra attention is needed labels Dec 12, 2019
@IlCallo
Copy link
Member Author

IlCallo commented Jan 15, 2020

  • Calculate and save hash of source image + options, avoid processing if a match is found (incremental processing)

@IlCallo
Copy link
Member Author

IlCallo commented Apr 7, 2021

We should use cache-loader to avoid repeating processing for older images.
Unluckily, emitted files aren't cached: webpack-contrib/cache-loader#99
There is an unmerged solving PR: webpack-contrib/cache-loader#109

Since the package is deprecated (Webpack 5 manages cache natively), we should fork the project, apply the PR and re-publish it under our scope

@IlCallo
Copy link
Member Author

IlCallo commented Feb 15, 2022

Since the package is deprecated (Webpack 5 manages cache natively), we should fork the project, apply the PR and re-publish it under our scope

We bumped a new minor version which support webpack 5 only and added a section to leverage the built-in cache system instead

@IlCallo IlCallo transferred this issue from dreamonkey/responsive-image-loader Apr 5, 2022
@IlCallo
Copy link
Member Author

IlCallo commented Apr 5, 2022

Transformation into a plugin broke native cache support, as we're not emitting files from the loader anymore with emitFile, but with emitAsset into the plugin, so they're not taken into consideration when running a subsequent build using the cache.
We need to re-enable it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant