Description
Recently starting from bonsai-rx/docs#114 we have starting enabling this property in docfx.json which reduces API/Reference page clutter and sorts the TOC into types. This is intended to be a first step towards standardizing a new template for our API/Reference pages.
"memberLayout": "separatePages"
However this option exacerbates the underlying issue in #23.
Example
For instance, using the same example of the Bonsai.Core docs illustrated in #23 with this command:
dotnet docfx --exportRawModel
- When
memberLayout is not defined:
It generates ~1000 RawModel files, each ~70MB with >1.8 million lines of code. This command took 30 minutes to build.
- When
memberLayout: separatePages is defined:
It generates ~4000 RawModel files, each ~90MB with >2.4 million lines of code. I did not let this command finish, but I estimate it would have taken 2-3 hours.
Enabling this option makes the issue even apparent for smaller repositories like Bonsai.ML where it was not an issue before. Using this command
No template, no separatePages - 30 seconds
Template, no separatePages - 45 seconds
Template, separatePages - 2 minutes 30 seconds.
Solution
I believe that while we should enable it for now as we do not have a standardized template yet, we should disable it once we implement the ManagedReference templates.
As this option also changes the RawModel that is used by the javascript processing scripts, we could also plan for the future and not build ManagedReference templates on top of it, as we would need to adapt those scripts if we phase it out. I believe that everything that is done with that option can be achieved with the ManagedReference templates.
Description
Recently starting from bonsai-rx/docs#114 we have starting enabling this property in
docfx.jsonwhich reduces API/Reference page clutter and sorts the TOC into types. This is intended to be a first step towards standardizing a new template for our API/Reference pages.However this option exacerbates the underlying issue in #23.
Example
For instance, using the same example of the Bonsai.Core docs illustrated in #23 with this command:
dotnet docfx --exportRawModelmemberLayoutis not defined:It generates ~1000
RawModelfiles, each ~70MB with >1.8 million lines of code. This command took 30 minutes to build.memberLayout: separatePagesis defined:It generates ~4000
RawModelfiles, each ~90MB with >2.4 million lines of code. I did not let this command finish, but I estimate it would have taken 2-3 hours.Enabling this option makes the issue even apparent for smaller repositories like
Bonsai.MLwhere it was not an issue before. Using this commanddotnet docfx --serveNo template, no
separatePages- 30 secondsTemplate, no
separatePages- 45 secondsTemplate,
separatePages- 2 minutes 30 seconds.Solution
I believe that while we should enable it for now as we do not have a standardized template yet, we should disable it once we implement the
ManagedReferencetemplates.As this option also changes the
RawModelthat is used by the javascript processing scripts, we could also plan for the future and not buildManagedReferencetemplates on top of it, as we would need to adapt those scripts if we phase it out. I believe that everything that is done with that option can be achieved with theManagedReferencetemplates.