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

Make a few optimizations #3660

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Conversation

jensjoha
Copy link
Contributor

@jensjoha jensjoha commented Feb 16, 2024

This:

  • Make 'allFields' a late field instead
  • Cache _inheritedElements in allModelElements call
  • Make documentedWhere a late field

Measusred on top of (and compared to) #3659 (I couldn't figure out how to actually do a stacked thing on github):

Very small, JIT:

Difference at 95.0% confidence
        -2052.67 +/- 417.162
        -13.7812% +/- 2.80075%
        (Student's t, pooled s = 184.048)

Very small, AOT:

Difference at 95.0% confidence
        -1370.33 +/- 214.258
        -20.2832% +/- 3.17138%
        (Student's t, pooled s = 94.5287)

Flutter, JIT:

Difference at 95.0% confidence
        -5111.33 +/- 2168.41
        -6.57446% +/- 2.78912%
        (Student's t, pooled s = 956.682)

Flutter, AOT:

Difference at 95.0% confidence
        -3224.33 +/- 599.597
        -5.33441% +/- 0.991988%
        (Student's t, pooled s = 264.537)

So it seems better across the board, but comparably less so for a big application (flutter in this case) --- which makes sense because most of the time is spent in the "generator.generate" (name from the "Runtime performance" when running with -v) where these changes is optimizing the "initializePackageGraph" part...

  * Make 'allFields' a late field instead
  * Cache _inheritedElements in allModelElements call
  * Make documentedWhere a late field
@jensjoha jensjoha requested a review from srawlins February 16, 2024 12:37
Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks these look fine!

@srawlins srawlins merged commit 7e171fc into dart-lang:main Feb 16, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants