We had a problem with Docz being super slow on Netlify platform, but also on our local computers. Due to default speed of Netlify build machines, the problem was especially noticeable there, rather than on powerful local dev machines.
We managed to reduce the build time (docz build) from ~770ms to ~130 by simply setting src property of doczrc.js to src subfolder, which is where we store all our source files.
The project is in monorepo (but that is hardly relevant here) and folder tree looks like that
We spent a lot of time on debugging before tried to change configuration of doczrc.js.
Not having src value set to anything makes it ./, according to docs, so Docz/Gatsby must be scanning a lot of files and folder, like - I'm guessing - build folder, node_modules (these are very light in our case, as most of stuff is inside of monorepos root folder node_modules, no the package's), maybe even .docz folder itself.
Feature suggestion
Is to add some form of information to developer that most probably he does not want to stay with default value of src property. It could be one of:
change in documentation somewhere
warning when running docz build and docz dev if src is set to ./
Background
We had a problem with Docz being super slow on Netlify platform, but also on our local computers. Due to default speed of Netlify build machines, the problem was especially noticeable there, rather than on powerful local dev machines.
We managed to reduce the build time (
docz build
) from ~770ms to ~130 by simply settingsrc
property ofdoczrc.js
tosrc
subfolder, which is where we store all our source files.The project is in monorepo (but that is hardly relevant here) and folder tree looks like that
We spent a lot of time on debugging before tried to change configuration of doczrc.js.
Not having
src
value set to anything makes it./
, according to docs, so Docz/Gatsby must be scanning a lot of files and folder, like - I'm guessing - build folder, node_modules (these are very light in our case, as most of stuff is inside of monorepos root folder node_modules, no the package's), maybe even .docz folder itself.Feature suggestion
Is to add some form of information to developer that most probably he does not want to stay with default value of
src
property. It could be one of:docz build
anddocz dev
ifsrc
is set to./
thanks!