-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* eslint-env node */ | ||
|
||
const isDev = process.env.NODE_ENV === "development"; | ||
module.exports = { | ||
siteMetadata: { | ||
title: "Layer5 - Expect more from your infrastructure", | ||
|
@@ -13,7 +13,8 @@ module.exports = { | |
}, | ||
flags: { | ||
FAST_DEV: true, | ||
PARALLEL_SOURCING: true | ||
PARALLEL_SOURCING: true, | ||
PARALLEL_QUERY_RUNNING: true | ||
}, | ||
trailingSlash: "never", | ||
plugins: [ | ||
|
@@ -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 commentThe 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 commentThe 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. |
||
} | ||
} | ||
}, | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
gatsbyjs/gatsby#32389
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.