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

Memory cache Build improvement: two file reads with one input file used in two separate places with different output widths #173

Open
zachleat opened this issue Jan 30, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@zachleat
Copy link
Member

zachleat commented Jan 30, 2023

e.g. on 11ty-website:

{% image "./src/img/possum-geri.png", "The possum is Eleventy’s mascot", [350], "elv-possum" %}
{% image "./src/img/possum-geri.png", "3 possums suspended from a red balloon", [null] %}

This will add two separate entries to the memory cache (which is correct, note that widths is [350] on one and [null] on another) but performance could be improved—it reads the file contents from the file system twice!

@zachleat zachleat added the enhancement New feature or request label Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant