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
Describe the bug
When using the templating system it is often desirable to set the isShared flag in the function exports.getOptions to true in order to access information from other objects to customize the API template. However, this leads to growing of the RawModel size, which becomes an issue especially for large repositories and leads to exponential growth of the applying template to X models part of the docfx build process.
To Reproduce
Steps to reproduce the behavior:
Choose a large repository (few hundred - thousand API objects)
Create a template folder with a file called 'ManagedReference.overwrite.js`.
Add template folder to docfx.jsontemplate property.
Run
dotnet docfx --exportRawModel
On a repository that produces ~1000 models, this takes 30 minutes on my computer and generates ~1000 individual RawModel files that are each ~70Mb in size and >1.8 million lines. Even if the RawModel files are not being exported, template processing is very slow, so I think the problem is just that the input data model is just very large which affects the exports.transform function for every item.
Expected Behaviour
While I think it is expected behaviour, I think it could be optimized.
Desired Solution
Is there a way to control what is being shared, such that the RawModel size is not so large? I see two possible options:
Filtering which RawModels to share.
Filtering which items in a RawModel are being shared.
This might already be doable with exports.getOptions, but I am not sure how, so if someone can point me to an example that would be great!
Context (please complete the following information):
Browser: Chrome
Form factor: Desktop
Docfx version: 2.78.2
Template: default, custom.
The text was updated successfully, but these errors were encountered:
banchan86
changed the title
[Bug] Exponential growth of RawModel size when shared
[Bug] Exponential growth of template procressing time for large repositories due to shared RawModels
Jan 16, 2025
banchan86
changed the title
[Bug] Exponential growth of template procressing time for large repositories due to shared RawModels
[Bug] Exponential growth of template processing time for large repositories due to shared RawModels
Jan 16, 2025
Describe the bug
When using the templating system it is often desirable to set the
isShared
flag in the functionexports.getOptions
totrue
in order to access information from other objects to customize the API template. However, this leads to growing of theRawModel
size, which becomes an issue especially for large repositories and leads to exponential growth of theapplying template to X models
part of thedocfx
build process.To Reproduce
Steps to reproduce the behavior:
docfx.json
template
property.dotnet docfx --exportRawModel
RawModel
files that are each ~70Mb in size and >1.8 million lines. Even if theRawModel
files are not being exported, template processing is very slow, so I think the problem is just that the input data model is just very large which affects theexports.transform
function for every item.Expected Behaviour
While I think it is expected behaviour, I think it could be optimized.
Desired Solution
Is there a way to control what is being shared, such that the
RawModel
size is not so large? I see two possible options:RawModels
to share.RawModel
are being shared.This might already be doable with
exports.getOptions
, but I am not sure how, so if someone can point me to an example that would be great!Context (please complete the following information):
The text was updated successfully, but these errors were encountered: