You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
dotnet docfx --serve
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.
The text was updated successfully, but these errors were encountered:
@banchan86 thanks for the investigation! I was wondering that one thing which may be possible to do in order to bring the separate pages to be at least the same as without could be to avoid sharing models of individual members.
I noticed that the JavaScript function controlling sharing takes a model as the input:
Up to now we have just been sharing everything by default, but I wonder if there is some attribute or property of the model object which we could use to know whether a particular model is a separate member page. If this were possible we could use that as a test to avoid sharing the individual member pages and therefore hopefully bring the separate members build to match the non-separate one.
Your suggestion seemed like it would be an easy fix, so I tried it out on the Bonsai.ML repository. It seems like all the extra separatePages RawModel files have model._isOverload defined and set to true (it's a lil bit weird to me) so something like this works:
While it does trim the RawModel size, it has less of an impact on performance as the number of RawModels is still the same. This is what I found when I tested dotnet docfx --exportRawModel:
no separatePages, full_share - 30 secs, , 90 raw.json files, individual raw.json ~8MB, total size 722MB
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.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
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.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 commanddotnet docfx --serve
No 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
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 buildManagedReference
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 theManagedReference
templates.The text was updated successfully, but these errors were encountered: