You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was doing a little cpu profiling as one does when they have nothing better to do,
dev server
and I noticed that 11ty seems to be burning precious milliseconds on loading the development server even when the serve command is not called.
I noticed that 50-60ms appears to be in (anonymous server.js:1) (file:///Users/evan/Code/site/node_modules/.pnpm/@[email protected]/node_modules/@11ty/eleventy-dev-server/server.js:1:1)
The command I did was node --cpu-prof ./node_modules/@11ty/eleventy/cmd.cjs --quiet, so no dev server should have launched, and indeed none did, but node still spent time loading it due to the top level import. await import(ing would save 50-60ms or so. Amazing!!
micromatch and fast-glob
it appears 11ty is using two glob libraries for some reason? each one of them takes between 10-15ms to load, so that much would be saved by only using one
maybe the micromatch direct dep can be removed but it won't impact perf because fast-glob uses it
thank you for attending my ted talk. god bless 11ty.
The text was updated successfully, but these errors were encountered:
Hi, I was doing a little cpu profiling as one does when they have nothing better to do,
dev server
and I noticed that 11ty seems to be burning precious milliseconds on loading the development server even when the serve command is not called.
I noticed that 50-60ms appears to be in
(anonymous server.js:1) (file:///Users/evan/Code/site/node_modules/.pnpm/@[email protected]/node_modules/@11ty/eleventy-dev-server/server.js:1:1)
The command I did was
node --cpu-prof ./node_modules/@11ty/eleventy/cmd.cjs --quiet
, so no dev server should have launched, and indeed none did, but node still spent time loading it due to the top level import.await import(
ing would save 50-60ms or so. Amazing!!micromatch and fast-globit appears 11ty is using two glob libraries for some reason? each one of them takes between 10-15ms to load, so that much would be saved by only using onemaybe the micromatch direct dep can be removed but it won't impact perf because fast-glob uses it
thank you for attending my ted talk. god bless 11ty.
The text was updated successfully, but these errors were encountered: