Have you read the Contributing Guidelines on issues?
Prerequisites
Description
The issue seems to be globby scanning all node_modules folders which was the main reason for slowness.
Before fixing log:
[PERF] CLI start > Load site > Load plugins > Load plugins content > Load docs@default > contentLoaded() - 39.57 ms - (Heap 115mb -> 117mb / Total 272mb)
[PERF] CLI start > Load site > Load plugins > Load plugins content > Load docs@default - 34.38 seconds! - (Heap 87mb -> 117mb / Total 272mb)
After fixing:
[PERF] CLI start > Load site > Load plugins > Load plugins content > Load docs@default > contentLoaded() - 41.76 ms - (Heap 101mb -> 104mb / Total 222mb)
[PERF] CLI start > Load site > Load plugins > Load plugins content > Load docs@default - 329.71 ms - (Heap 94mb -> 104mb / Total 222mb)
[PERF] CLI start > Load site > Load plugins > Load plugins content - 329.90 ms - (Heap 94mb -> 104mb / Total 222mb)
async function readCategoriesMetadata(contentPath) {
const categoryFiles = await (0, utils_1.Globby)('**/_category_.{json,yml,yaml}', {
cwd: contentPath,
ignore: ['**/node_modules/**', '**/dist/**'], --> fix
});
Need to add ignore to globby to fix the slowness
Reproducible demo
No response
Steps to reproduce
Have a monorepo with node_modules linked to each packages.
Expected behavior
Docusaurus should start within seconds.
Actual behavior
Docusaurus is very slow to start
Your environment
- Public source code:
- Public site URL:
- Docusaurus version used:
- Environment name and version (e.g. Chrome 89, Node.js 16.4):
- Operating system and version (e.g. Ubuntu 20.04.2 LTS):
Self-service
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
The issue seems to be globby scanning all node_modules folders which was the main reason for slowness.
Before fixing log:
[PERF] CLI start > Load site > Load plugins > Load plugins content > Load docs@default > contentLoaded() - 39.57 ms - (Heap 115mb -> 117mb / Total 272mb)
[PERF] CLI start > Load site > Load plugins > Load plugins content > Load docs@default - 34.38 seconds! - (Heap 87mb -> 117mb / Total 272mb)
After fixing:
[PERF] CLI start > Load site > Load plugins > Load plugins content > Load docs@default > contentLoaded() - 41.76 ms - (Heap 101mb -> 104mb / Total 222mb)
[PERF] CLI start > Load site > Load plugins > Load plugins content > Load docs@default - 329.71 ms - (Heap 94mb -> 104mb / Total 222mb)
[PERF] CLI start > Load site > Load plugins > Load plugins content - 329.90 ms - (Heap 94mb -> 104mb / Total 222mb)
Need to add ignore to globby to fix the slowness
Reproducible demo
No response
Steps to reproduce
Have a monorepo with node_modules linked to each packages.
Expected behavior
Docusaurus should start within seconds.
Actual behavior
Docusaurus is very slow to start
Your environment
Self-service