Skip to content

docfx memberLayout option affects processing speed for ManagedRef templates by increasing RawModel size and number #24

@banchan86

Description

@banchan86

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions