Replies: 5 comments
-
That'd be a nice feature — tracking execution time / plugin. Which plugins do implement |
Beta Was this translation helpful? Give feedback.
-
👋 @KyleAMathews Appreciate the response and thanks for the recommendation on {
allMdx(
sort: { fields: [frontmatter___date], order: DESC }
filter: {
fileAbsolutePath: { regex: "/src/posts/" }
frontmatter: { title: { ne: "BLUEPRINT" } }
}
) {
edges {
node {
fileAbsolutePath
excerpt(pruneLength: 120)
timeToRead
rawBody
body
frontmatter {
title
description
canonical
date
dateModified
slug
featuredImage
socialMediaImage
categories
author
hideFromResources
topics
}
tableOfContents(maxDepth: 3)
fields {
slug
fullUrl
categoryUrls
authorUrl
featuredImage
}
}
}
}
} I need the |
Beta Was this translation helpful? Give feedback.
-
Ah that could be it. MDX is... slow — as it has to do babel transforms + bundling etc. |
Beta Was this translation helpful? Give feedback.
-
Yeah it's probably MDX. 900 pages should be super fast to source, but MDX does like a double babel parse at bootstrap time which can explain this. There's no easy way to get this info unfortunately. You can hook into the tracing (https://www.gatsbyjs.com/docs/performance-tracing/) but it's very noisy. I tend to use something like timeSum (https://gist.github.com/pvdz/793f89bca3b27501479488b4abbb8972) in serial mode to figure out where time is spent. Can you verify what happens when you (as a test) switch to regular markdown? Just roughly, you don't need to a full port. |
Beta Was this translation helpful? Give feedback.
-
Thanks both! Does the initial boot-time (and slow reloads) lend itself at all to lazily querying pages in development as they are needed? I believe I recall seeing an issue around that and figured aside from this specific usecase, boot-times could be improved quite a bit if what Gatsby was listening for was on-demand. FWIW with this, I removed the 3 remark plugins I had and saw the |
Beta Was this translation helpful? Give feedback.
-
👋 Are there any tools available to help me dig a bit deeper into why my
createPages
is taking so long? Without cache and about 300 pages, it's taking on average about 90 seconds, which is the majority of my bootstrap time. The other 20s or so is always around transforming source nodes. Refreshing content after changes to .md files is also quite slow.I noticed a decrease when removing the
gatsbyRemarkPlugins
, but blindly removing and rebuilding is a pretty time-consuming task. If there was a breakdown of how long each plugin was adding to the boot process, similar to Atom and VSCode, that'd be immensely helpful.Here's my
gatsby.config.esm
:Beta Was this translation helpful? Give feedback.
All reactions