Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert many fields on Container and TopLevelContainer to getters #3710

Merged
merged 1 commit into from
Mar 9, 2024

Commits on Mar 8, 2024

  1. Convert many fields on Container and TopLevelContainer to getters

    These were late, final, and public, my least favorite thing. The idea,
    historically, behind late final fields in dartdoc is caching. If a value is
    expensive to calculate, like a big list of things, and we have to access that
    value a few times, best to calculate it once.
    
    But some late final fields are only accessed while rendering HTML, accessed
    from the rendered templates. And typically only accessed once. The '*Sorted'
    fields definitely fall into this bucket. So I made them all getters, and then
    benchmarked with the googleapis package, and found no significant change in
    time-to-document, or max RSS.
    srawlins committed Mar 8, 2024
    Configuration menu
    Copy the full SHA
    50122c0 View commit details
    Browse the repository at this point in the history