8000 Improve performance with reduced parsing · Issue #4021 · dart-lang/build · GitHub
[go: up one dir, main page]

Skip to content
Improve performance with reduced parsing #4021
@davidmorgan

Description

@davidmorgan

Types of parsing/resolving today:

  • When a builder asks for the AST of a file, the analyzer parses it
  • When a builder resolves a file, build_runner parses it and its deps to get the directives graph; then passes those files to the analyzer, which again parses for the directives graph, parses for the full AST, and resolves

Possibly these can be reduced in a few days:

  • build_runner only needs the directives, can we do a faster parse that stops after the directives? Or, can we dedupe the work so that if build_runner has parsed for the directives, the parse result is used by the analyzer later?
  • if a builder only uses the element model and not the AST, can we save work by reduced parsing of method bodies?

Here is an example change that skips parsing method bodies to get a performance improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0