question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to notice any difference in subsequent build times using incremental build approach

See original GitHub issue

Hi team, I’m facing issue using the new incremental build feature, I’ve set the GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true in .env file And then gatsby build I don’t see any time difference among the subsequent builds even while not updating any file, content, or be it a data source Using it in POWERSHELL, $env:GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES="true"; gatsby build , it still takes the same time as it does during the initial build Incremental builds are supposed to reduce build times, right? Am I using it in the wrong way? Need help configuring the incremental build flag, the build time on every small update is very costly as of now Current build time: 420 seconds

System

Windows 10 Pro VScode terminal (PowerShell) node -v: v12.16.2 npm -v: 6.14.4

package.json

{
  "name": "gatsby-starter-default",
  "private": true,
  "description": "A simple starter to get up and developing quickly with Gatsby",
  "version": "0.1.0",
  "author": "Kyle Mathews <mathews.kyle@gmail.com>",
  "dependencies": {
    "@mdx-js/mdx": "^1.5.8",
    "@mdx-js/react": "^1.5.8",
    "axios": "^0.19.2",
    "dotenv": "^8.2.0",
    "gatsby": "^2.19.45",
    "gatsby-image": "^2.2.44",
    "gatsby-plugin-catch-links": "^2.2.1",
    "gatsby-plugin-manifest": "^2.2.48",
    "gatsby-plugin-mdx": "^1.1.4",
    "gatsby-plugin-offline": "^3.0.41",
    "gatsby-plugin-react-helmet": "^3.1.24",
    "gatsby-plugin-sass": "^2.2.1",
    "gatsby-plugin-sharp": "^2.4.13",
    "gatsby-source-filesystem": "^2.2.2",
    "gatsby-source-git": "^1.0.2",
    "gatsby-source-mongodb": "^2.2.1",
    "gatsby-transformer-remark": "^2.7.1",
    "gatsby-transformer-sharp": "^2.3.19",
    "http-server": "^0.12.1",
    "monaco-editor": "^0.20.0",
    "monaco-editor-webpack-plugin": "^1.9.0",
    "node-sass": "^4.13.1",
    "prop-types": "^15.7.2",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-helmet": "^5.2.1",
    "react-monaco-editor": "^0.35.0"
  },
  "devDependencies": {
    "prettier": "^1.19.1"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "scripts": {
    "build": "npm run clean && gatsby build",
    "develop": "gatsby develop",
    "format": "prettier --write \"**/*.{js,jsx,json,md}\"",
    "start": "npm run clean && npm run develop",
    "serve": "npm run clean && gatsby build && gatsby serve",
    "clean": "gatsby clean",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-default"
  },
  "bugs": {
    "url": "https://github.com/gatsbyjs/gatsby/issues"
  }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
StuartRaysoncommented, Apr 30, 2020

@ascorbic 👋

Might be worth updating the documentation for the usage of GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES to make it clear that this is not the same solution to Gatsby Cloud incremental build.

As i’ve seen another issue where users are expecting the same build times as Gatsby Cloud using just this environment variable. https://github.com/gatsbyjs/gatsby/issues/23531

i’m happy to do this?

1reaction
ascorbiccommented, Apr 30, 2020

I think the confusion here is that GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true is a different thing from the incremental builds on Gatsby Cloud, so you shouldn’t expect the same results. As @StuartRayson points out, page building is only one part of the build that can take a long time, so unfortunately even if that is quicker you won’t be able to get sub 10-second builds like on Gatsby Cloud. (FWIW, you don’t need an Enterpise account to get them.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Java Plugin - Gradle User Manual
As indicated above, this plugin adds basic building blocks for working with JVM projects. Its feature set has been superseded by other plugins,...
Read more >
Improving the speed of incremental builds - Apple Developer
The first time you build your project, Xcode builds everything, but subsequent builds are incremental. For each incremental build, pay particular attention ...
Read more >
Build Automation: Top 3 Problems and How to Solve Them
Incremental builds are difficult - often you'll want to run a partial build and re-purpose items that haven't changed and were previously compiled....
Read more >
What is Gatsby Incremental Builds?
From Static to Real-time: Introducing Incremental Builds in Gatsby ... static vs. database approaches in the form of two different CMSs, ...
Read more >
Is it safe to use incremental rebuild for generating release ...
If you use an incremental build, the build will build differently each time because only a subset of the system will need to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found