Closed healeycodes closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
ter | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 19, 2023 8:05pm |
Looks great! As always, thanks for your contribution :D
👋 @kkga
This
getChildPages
optimization speeds up the 10k markdown file benchmark by 20-30sec on my M1 Pro.I traced the benchmark and saw we were spending 60sec in this function:
We call
getChildPages
twice per page and end up doing duplicate work (looping the other pages).This PR roughly halves the amount of time we spend in this function.
There are no performance benefits for small builds (e.g. docs).
As always, no pressure to merge this – just sharing for interest :)
Benchmark used