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.

Building schema step taking significantly longer under gatsby 3 than gatsby 2.3

See original GitHub issue

Description

Data source: Contentful

The Building Schema step is taking longer than expected to finish often more than 90 seconds this is significantly longer than the same data source under gatsby 2

image

Steps to reproduce

Check out https://github.com/grgcnnr/gatsby-ctf-build-schema-test (contentful access token is hard coded into config) npm install gatsby build

Expected result

Previous schema build steps under gatsby 2.3x were taking approximately 20 seconds

image I would hope similar performance would be achievable

Actual result

Building Schema step consistently takes more than 80 seconds.

Environment

Minimum repro:

    OS: macOS 11.3.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
    npm: 6.14.12 - ~/.nvm/versions/node/v14.16.1/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 90.0.4430.212
    Edge: 90.0.818.62
    Safari: 14.1
  npmPackages:
    gatsby: ^3.4.1 => 3.4.1
    gatsby-plugin-gatsby-cloud: ^2.4.1 => 2.4.1
    gatsby-plugin-image: ^1.4.0 => 1.4.0
    gatsby-plugin-manifest: ^3.4.0 => 3.4.0
    gatsby-plugin-offline: ^4.4.0 => 4.4.0
    gatsby-plugin-react-helmet: ^4.4.0 => 4.4.0
    gatsby-plugin-sharp: ^3.4.1 => 3.4.1
    gatsby-source-contentful: ^5.5.0 => 5.5.0
    gatsby-source-filesystem: ^3.4.0 => 3.4.0
    gatsby-transformer-sharp: ^3.4.0 => 3.4.0
  npmGlobalPackages:
    gatsby-cli: 3.5.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
axe312gercommented, Jul 13, 2021

@grgcnnr I am preparing a new major version which should reduce schema generation overhead drastically, especially for complex/large projects. Feel free to follow #31385 to get updated as soon the canary is ready 😃

1reaction
axe312gercommented, Feb 9, 2022

I know it is easier to say as to do 🙈

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improving Build Performance Guide - Gatsby
3. Reducing build times from schema creation, image processing, ... If it's longer than 10s, check if there's fields you can remove from...
Read more >
The Great Gatsby Bootcamp - Full Gatsby.js Tutorial Course
Gatsby is a framework for creating blazing fast websites and web applications. Powered by React and GraphQL, Gatsby gives you everything you ...
Read more >
Error building schema with gatsby-source-filesystem config ...
js. I'm just using the simple gatsby config file as in the tuto: module.exports = { siteMetadata ...
Read more >
gatsby | Yarn - Package Manager
Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps. It combines the...
Read more >
Building a Static Gatsby-based Website with TypeScript
Note: you shouldn't need to do this if you have setup Gatsby using the quick start. npm install --save \ gatsby \ gatsby-image...
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