"update schema" step really slow after upgrading from 2.17 to 2.18
See original GitHub issueDescription
Site with 20k pages, currently using version 2.17.6. We pass JSON data via context (hence not using GraphQL), so we have switched off type inference for SitePage.context to speed up compilation, as stated here.
These are the timings we get using 2.17.6:
2.17.6 timings
=======================================
success source and transform nodes - 4.247s
success building schema - 1.292s
success createPages - 23.121s
success createPagesStatefully - 0.079s
success onPreExtractQueries - 0.001s
success update schema - 0.051s
After upgrading from 2.17.6 to 2.18.12, “update schema” step is taking ~40 seconds instead of 0.051s:
2.18.12 timings
=======================================
success source and transform nodes - 5.167s
success building schema - 1.206s
success createPages - 27.748s
success createPagesStatefully - 0.108s
success onPreExtractQueries - 0.000s
success update schema - 41.675s
It’s this problem related to “update schema” step not taking into account that type inference is disabled for SitePage.context?
Steps to reproduce
Our repo is private, but we are willing to provide access to any Gatsby employee (maybe @pvdz)
Expected result
“update schema” step should not take any time, as it did with v2.17.6.
Actual result
It takes ~40 seconds instead of ~0s
Environment
System:
OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 12.12.0 - ~/.nvm/versions/node/v12.12.0/bin/node
Yarn: 1.21.1 - /usr/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.12.0/bin/npm
Languages:
Python: 2.7.17 - /usr/bin/python
Browsers:
Chrome: 79.0.3945.88
Firefox: 71.0
npmPackages:
gatsby: ^2.18.12 => 2.18.17
gatsby-plugin-emotion: ^4.1.18 => 4.1.18
gatsby-plugin-eslint: 2.0.8 => 2.0.8
gatsby-plugin-manifest: ^2.2.34 => 2.2.34
gatsby-plugin-react-helmet: ^3.1.18 => 3.1.18
gatsby-plugin-webpack-bundle-analyzer: ^1.0.5 => 1.0.5
gatsby-source-filesystem: ^2.1.43 => 2.1.43
gatsby-transformer-json: ^2.2.22 => 2.2.22
npmGlobalPackages:
gatsby-cli: 2.8.22
gatsby: 2.1.19
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
History of Changes - XMLBeans
When not specifing type for a particle in derived schema type and when minOccurs is 0. update, Fixed error messages when contain base...
Read more >Upgrading Oracle Identity Manager
The out-of-place upgrade procedure discussed in this guide explains how to perform a cloned upgrade of Oracle Identity Manager 12c (12.2.1.3.0) to Oracle ......
Read more >CircleCI Release Notes
When migrating to server v4.x, Telegraf configuration data is now decoded and ... jobs page and step output access to run very slow...
Read more >Bugzilla 2.20.6 Release Notes
If you are upgrading from a version before 2.18, also read the 2.18 release notes (lower in this file) and any previous release...
Read more >Fix list for Rational ClearQuest - IBM
PH46262, After an update to ClearQuest 9.0.1.13, connections to an Oracle database ... This causes slower performance for user database upgrades as you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed this. A PR with a fix: #20662
This is the whole output from 2.17.6:
And this the one from 2.18.12:
As you can see:
All in all, the difference between two versions is about ~11 seconds.
Since we have switched off type inference for SitePage.context, shouldn’t “update schema” step be faster, or even bypassed? We effectively know that we haven’t changed any field after createPages, so could be opt-out of that schema update just like we did with type inference for SitePage.context?