microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

yarn develop takes a very long time to start #316

Closed tballmsft closed 3 years ago

tballmsft commented 3 years ago

on 'yarn develop', the process waits for a very long time (>5 minutes):

info mkcd: storing images in ./public/images/makecode
info mkcd: browser HeadlessChrome/90.0.4427.0
info mkcd: loading https://makecode.microbit.org/beta---docs?render=1&dbg=1
info mkcd: renderer ready (v3.1.65)
success Checking for changed pages - 0.001s
success source and transform nodes - 9.584s
success building schema - 0.777s
info Total nodes: 657, SitePage nodes: 258 (use --verbose for breakdown)
success createPages - 0.666s
success Checking for changed pages - 0.000s
success createPagesStatefully - 2.078s
success update schema - 0.075s
success write out redirect data - 0.002s

Killing the process and rerunning without a clean gets further but stalls again:

success load plugins - 3.743s
success onPreInit - 0.081s
success initialize cache - 0.043s
success copy gatsby files - 0.174s
success onPreBootstrap - 0.747s
success createSchemaCustomization - 0.243s
mkcd: initializing
info mkcd: storing images in ./public/images/makecode
info mkcd: browser HeadlessChrome/90.0.4427.0
info mkcd: loading https://makecode.microbit.org/beta---docs?render=1&dbg=1
info mkcd: renderer ready (v3.1.65)
success Checking for changed pages - 0.001s
success source and transform nodes - 6.912s
success building schema - 0.811s
info Total nodes: 657, SitePage nodes: 258 (use --verbose for breakdown)
success createPages - 0.711s
success Checking for changed pages - 0.001s
success createPagesStatefully - 1.993s
success update schema - 0.057s
success write out redirect data - 0.004s
success Build manifest and related icons - 0.143s
success onPostBootstrap - 0.149s
info bootstrap finished - 21.079s
success onPreExtractQueries - 0.001s
success extract queries from components - 2.330s
success write out requires - 0.156s
success run static queries - 8.275s - 4/4 0.48/s
success run page queries - 0.052s - 3/3 57.79/s

On a second kill and third try, finally get there

You can now view jacdac-docs in the browser.
⠀
  http://localhost:8000/
⠀
View GraphiQL, an in-browser IDE, to explore your site's data and schema
⠀
  http://localhost:8000/___graphql
⠀
Note that the development build is not optimized.
To create a production build, use gatsby build
⠀
warn asset size limit: The following asset(s) exceed the recommended size limit
(244 KiB).
This can impact web performance.
Assets:
  0.js (344 KiB)
  2.js (1.37 MiB)
  3.js (8.23 MiB)
  9.js (261 KiB)
  56.js (274 KiB)
  commons.js (36.3 MiB)
  polyfill.js (400 KiB)
warn entrypoint size limit: The following entrypoint(s) combined asset size
exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  polyfill (400 KiB)
      polyfill.js
  commons (36.3 MiB)
      commons.css
      commons.js

success Building development bundle - 109.015s
tballmsft commented 3 years ago

Note that killing process on Windows under git bash sometimes leaves node processes around - they must be killed with Task Manager.

pelikhan commented 3 years ago

Needs to be upstreamed to gatsbyjs.

pelikhan commented 3 years ago

Needs to be upstreamed to gatsbyjs.

tballmsft commented 3 years ago

Is there any way to get more information about what gatsbyjs is doing first?

tballmsft commented 3 years ago

Found this: https://stackoverflow.com/questions/60954457/what-might-cause-gatsby-develop-to-get-stuck-while-building-development-bundl

I will investigate a bit more.

tballmsft commented 3 years ago

https://github.com/gatsbyjs/gatsby/issues/25859