Investigate dev-mode perf issues for fumadocs #1232
Labels
documentation
Improvements or additions to documentation
external-contributor-friendly
Doesn't rely heavily on contextual knowledge of ArkType (may still be complex)
Before migrating to fumadocs, there was a significant delay on saving a .ts file before you could see your changes reflected in browser while running
pnpm dev
.Though fumadocs has been a significant improvement in many ways, this has actually substantially worsened. I recently was able to fix the
--turbo
flag on dev mode, but even with that enabled, I'm often seeing ~10 seconds to reload the home page and ~25 seconds on initial navigation to the docs section (down from over 50 seconds).My best guess is somehow, twoslash is actually typechecking large portions of the repo in these cases to try and update inferred types. Typechecking the entire repo takes ~10 seconds locally, so that still doesn't account for all of it, but it's my best guess as to where to start for such extreme delays in such a small project.
Would love if someone better versed in Next.js could take a look and see if they can root cause it/find some potential improvements.
UPDATE: I did try removing twoslash and saw the compile time go from
~10s->~6s
for the homepage and~25s->~6s
for docs. Still seems pretty slow though...The text was updated successfully, but these errors were encountered: