Skip to content
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

[v2] improve how we load GraphQL query results in development/production (aka Ludicrous Mode) #4555

Merged
merged 38 commits into from
Apr 6, 2018

Commits on Mar 15, 2018

  1. Configuration menu
    Copy the full SHA
    e218c1f View commit details
    Browse the repository at this point in the history
  2. Rename

    m-allanson committed Mar 15, 2018
    Configuration menu
    Copy the full SHA
    0894947 View commit details
    Browse the repository at this point in the history
  3. Websocket placeholder

    m-allanson committed Mar 15, 2018
    Configuration menu
    Copy the full SHA
    4ca7dda View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2018

  1. Configuration menu
    Copy the full SHA
    cf55f6b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    293f36a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7e852cf View commit details
    Browse the repository at this point in the history
  4. Remove eslint-disable flag

    m-allanson committed Mar 16, 2018
    Configuration menu
    Copy the full SHA
    2adaffe View commit details
    Browse the repository at this point in the history
  5. Remove junk

    m-allanson committed Mar 16, 2018
    Configuration menu
    Copy the full SHA
    c03cc34 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ca50615 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    460ca7d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f4c92e5 View commit details
    Browse the repository at this point in the history
  9. initial async loading

    pieh committed Mar 16, 2018
    Configuration menu
    Copy the full SHA
    e6239ee View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4e064d7 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1801fa7 View commit details
    Browse the repository at this point in the history
  12. we load json data via json-loader component in develop and not handli…

    …ng it with webpack import/require
    pieh committed Mar 16, 2018
    Configuration menu
    Copy the full SHA
    53bc172 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2018

  1. hashes for json files

    pieh committed Mar 17, 2018
    Configuration menu
    Copy the full SHA
    adc3ce1 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2018

  1. fix preloading, use xhr instead of fetch - for some reason can't forc…

    …e fetch to not create additional request, with any `cache` or `mode` configuration
    pieh committed Mar 20, 2018
    Configuration menu
    Copy the full SHA
    9008479 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2018

  1. dont use full paths in dataPath - remove static/d/ path and .json ext…

    … - results in smaller app bundle especially with large ammount of pages
    pieh committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    3050620 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #4635 from pieh/json-loader

    [WIP][v2] build updates
    m-allanson authored Mar 21, 2018
    Configuration menu
    Copy the full SHA
    46e5235 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2018

  1. Configuration menu
    Copy the full SHA
    a3b6aee View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2018

  1. Don't dump all query results out to the client

    Instead only push results out if the data is for a path that's currently
    being viewed in a client.
    m-allanson committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    66e462c View commit details
    Browse the repository at this point in the history
  2. Merge pull request #4658 from m-allanson/load-develop-query-results

    [v2] Enable cached query results to be loaded
    m-allanson authored Mar 26, 2018
    Configuration menu
    Copy the full SHA
    8196649 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7602a73 View commit details
    Browse the repository at this point in the history
  4. fix preload link to json data

    pieh committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    f0b3b0c View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2018

  1. Configuration menu
    Copy the full SHA
    c268376 View commit details
    Browse the repository at this point in the history
  2. remove not used function

    pieh committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    2d9e286 View commit details
    Browse the repository at this point in the history
  3. remove more not used code

    pieh committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    95fcd4a View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2018

  1. Configuration menu
    Copy the full SHA
    20252dc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    44797c3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    467a792 View commit details
    Browse the repository at this point in the history
  4. Filter out duplicate query jobs and create secondary queue for jobs i…

    …f path already has query in flight
    KyleAMathews committed Mar 29, 2018
    Configuration menu
    Copy the full SHA
    dd442c7 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2018

  1. [json-loader] Don't emit new file node until previous is finished pro…

    …cessing (#4785)
    
    * Don't emit new file node until previous is finished processing
    
    This is an experiment to use
    [xstate](http://davidkpiano.github.io/xstate/docs/#/) to setup state
    machines to better handle complex state changes as we sometimes have.
    
    Ideally this happens in core and then gatsby-source-filesystem
    just has a simple queue and emits a new file node every time
    the system returns to idle.
    
    In a future refactor we'll do that plus refactor other parts of core
    that should be handled in a state machine e.g. pages-query-runner.js
    
    This PR also reinforced the need for us to implement
    [tracing](https://github.com/jaegertracing/jaeger) in core / plugins
    as that'd make it far far easier to understand what's happening and
    when.
    
    * Document state machine and remove extraneous Chokidar states
    
    * Remove console.log
    KyleAMathews authored Apr 3, 2018
    Configuration menu
    Copy the full SHA
    abcb58c View commit details
    Browse the repository at this point in the history
  2. [json-loader] Only log file events if we're past bootstrap (#4826)

    * Don't emit new file node until previous is finished processing
    
    This is an experiment to use
    [xstate](http://davidkpiano.github.io/xstate/docs/#/) to setup state
    machines to better handle complex state changes as we sometimes have.
    
    Ideally this happens in core and then gatsby-source-filesystem
    just has a simple queue and emits a new file node every time
    the system returns to idle.
    
    In a future refactor we'll do that plus refactor other parts of core
    that should be handled in a state machine e.g. pages-query-runner.js
    
    This PR also reinforced the need for us to implement
    [tracing](https://github.com/jaegertracing/jaeger) in core / plugins
    as that'd make it far far easier to understand what's happening and
    when.
    
    * Document state machine and remove extraneous Chokidar states
    
    * Remove console.log
    
    * Only log file events if we're past bootstrap
    KyleAMathews authored Apr 3, 2018
    Configuration menu
    Copy the full SHA
    e374818 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2018

  1. [json-loader] dont recompile on data change - part 2 (#4837)

    * prevent adding duplicate redirects
    
    * don't write new `redirects.json` if redirects didn't change
    
    prevents webpack recompilation on data change
    pieh authored and KyleAMathews committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    62754de View commit details
    Browse the repository at this point in the history
  2. [json-loader] develop - reading results from file improvments (#4850)

    * dont emit results for layouts
    
    * [develop] store query results in memory, read json data from file only if we don't have it stored yet (we didn't run this query, but results are cached)
    pieh authored and KyleAMathews committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    4a09f74 View commit details
    Browse the repository at this point in the history
  3. Add query prioritization based on what page(s) user(s) are on

    Query running is sadly not very ludicrous right now on gatsbyjs.org —
    not sure why — each markdown file change causes ~20 queries to run but
    even with prioritizing the active page's query, it's still ~2 seconds
    before the page updates.
    
    This sort of thing will be much easier to debug with tracing support.
    KyleAMathews committed Apr 5, 2018
    Configuration menu
    Copy the full SHA
    868ef8b View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2018

  1. Configuration menu
    Copy the full SHA
    b4fdecb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1bb7cc4 View commit details
    Browse the repository at this point in the history