Skip to content

Reduce time spent in TFA during AOT compilation #42442

Open
@alexmarkov

Description

@alexmarkov

We should reduce AOT compilation time as it begins hitting certain limit on an internal large app (b/158101962). There are multiple things we can do:

  • The vast majority of compilation time is spent in TFA. So we can investigate if we can do the analysis more efficiently.

  • The app uses protobuf tree shaker and repeats TFA after applying protobuf tree shaker, which means TFA is performed 2 times. We can integrate protobuf-aware tree shaker with TFA more closely and avoid the 2nd round of TFA: Consider integrating protobuf-aware treeshaking in TFA directly instead of running two rounds of TFA #40785

  • We can split compilation into multiple steps, serializing state after each step and resuming from the serialized state. This will allow us to reduce time spent on each step and avoid hitting the limit.
    https://dart-review.googlesource.com/c/sdk/+/150272 added --from-dill option which allows to split front-end part of the compilation into a separate step.

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub teamvm-tfa

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions