You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: use hashed folder names instead of filenames. closes#6232 (#8808)
**Related issue:** #6232@LekoArts mentioned two ways of implementing it (one that concatenates `argsDigest` with `contentDigest` and other that uses `contentDigest` as one directory and `argsDigest` as another child so images are grouped together and it limits the number of directories in `static` directory). This PR implements the latter.
### Performance impact
I measured the performance of original solution and one from this PR 5 times (and ignoring first build after changing gatsby version) for each (every time cleaning the cache) by running `gatsby build` on example [using-gatsby-image](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-gatsby-image).
Tested on Linux, Ryzen 2700X and 970 EVO.
#### Original (`2.0.18`)
- `14.70`
- `14.08`
- `13.65`
- `14.22`
- `13.80`
**Average:** `14.09`
#### This PR:
- `13.77`
- `13.51`
- `13.61`
- `13.78`
- `13.66`
**Average:** `13,666`
So this results in 3% improvement in build times (it might be just luck, but at least it doesn't increase build time).
0 commit comments