-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby-source-filesystem): Only generate hashes when a file has changed, and add an option for skipping hashing #37464
feat(gatsby-source-filesystem): Only generate hashes when a file has changed, and add an option for skipping hashing #37464
Conversation
…her packages that use this, add tests
Update feature branch with latest from master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I'll change the README a little bit more later, so code wise I only have some small requests :)
packages/gatsby-source-filesystem/src/__tests__/create-file-node.js
Outdated
Show resolved
Hide resolved
packages/gatsby-source-filesystem/src/__tests__/create-file-node.js
Outdated
Show resolved
Hide resolved
…to fastHash setting
latest from master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! A lot of people will benefit from that ❤️
…changed, and add an option for skipping hashing (gatsbyjs#37464) Co-authored-by: LekoArts <[email protected]>
Description
Generating an MD5 hash in
gatsby-source-filesystem
is quite an expensive operation for large files, and can increase build times significantly, as well as introduce other issues with open file handles.To mitigate this:
Documentation
I've added a section to the README explaining the new option. Not sure if what I wrote goes into sufficient detail (or too much detail) though.
Related Issues
Addresses #12011
Fixes #37425