-
Notifications
You must be signed in to change notification settings - Fork 1.3k
limit image processing on dev enviroment #6548
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
base: master
Are you sure you want to change the base?
limit image processing on dev enviroment #6548
Conversation
Signed-off-by: Liben Hailu <libenhailu04@gmail.com>
🚀 Preview for commit ffdab29 at: https://684c618cce729a715b08eca8--layer5.netlify.app |
@@ -13,7 +13,8 @@ module.exports = { | |||
}, | |||
flags: { | |||
FAST_DEV: true, | |||
PARALLEL_SOURCING: true | |||
PARALLEL_SOURCING: true, | |||
PARALLEL_QUERY_RUNNING: true |
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.
@LibenHailu could you explain the PARALLEL_QUERY_RUNNING
flag? or maybe point me to the docs for this one?
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.
@M-DEV-1 by default gatsby uses single thread to run the graphql quires, It is assumed that this flag helps gatsby to use multiple processes.
couldn't find it on the latest experiential flag tho here
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/flags.ts
I have 8-core CPU I saw some increase in CPU usage but I have to double check if the thing is working as expected.
@@ -513,7 +514,7 @@ module.exports = { | |||
resolve: "gatsby-plugin-sharp", | |||
options: { | |||
defaults: { | |||
placeholder: "blurred", | |||
placeholder: isDev ? "none" : "blurred", |
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.
what would placeholder "none" do when we're in dev environment?
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.
So if the placeholder is set to 'none', Gatsby skips further image processing in development mode. In production, it shows the blurred version until the full image loads.
@LibenHailu Add it as an agenda item to the meeting minutes, if you would :) |
🚀 Preview for commit bdea6e0 at: https://684ffafd9867bbbb9f407637--layer5.netlify.app |
Description
During development, gatsby-plugin-sharp and image queries trigger Sharp to process and cache all images, which leads to excessive RAM usage and makes the project heavy to run.
This PR fixes #
Notes for Reviewers
Disabling image processing especially placeholders during development can significantly reduce RAM usage.
Signed commits