Skip to content

dartdoc always parses full markdown even when it doesn't need to #1417

Closed
@jcollins-g

Description

@jcollins-g

Partially because markdown doesn't currently have an option to do otherwise, dartdoc has an issue where we always generate the full HTML for each ModelElement's comment via markdown, even when we don't need to (for example, only the oneLineDoc is used). This mattered less before 0.9.11 and canonicalization as we weren't as picky about what docs we write, but now we're generating and discarding a lot of HTML, repeatedly. Profiling suggests this is why complex packages are slow, because there is a lot of inheritance and a high percentage of non-canonical ModelElements.

Given that we have to run some of the markdown for non-canonical ModelElements so we can have one-line doc summaries, I propose:

  1. adding a markdown feature to only return HTML generated from the first node and using that for oneLineDoc
  2. change macros so we don't need to parse all docs in case one exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work ontype-code-healthInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainable

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions