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

perf(gatsby-plugin-mdx): Use getNodesByType for plugin transformation #22555

Merged
merged 1 commit into from
Mar 25, 2020

Commits on Mar 25, 2020

  1. fix(gatsby-plugin-mdx): Use getNodesByType for plugin transformation

    Since getSourcePluginsAsRemarkPlugins is called on
    every MDX file, the getNodes call became expensive
    at scale with thousands of MDX files.
    
    This was encountered when attempting to find
    underlying issues for gatsbyjs#22521. @pvdz had a hunch that
    node traversal may be a culprit. This doesn't fully
    address all underlying performance issues but
    is a quick win.
    
    8k MDX pages: 440s => 350s
    16k MDX pages: 1100s => 750s
    johno committed Mar 25, 2020
    Configuration menu
    Copy the full SHA
    9d2c056 View commit details
    Browse the repository at this point in the history