Skip to content

[native_assets_builder] Compile and run hooks in parallel #1288

Open
@dcharkes

Description

@dcharkes

We should consider:

  • compiling hooks in parallel
  • running hooks in parallel

We should be really optimizing for compile times in dart build / flutter build, e.g. if the package graphs depth is 30 and all of them use hooks, saving a single second (e.g. via parallel compile of hooks to kernel) would save half a minute for a developer.

Originally posted by @mkustermann in #1256 (comment)

The initial prototype was running hooks in parallel, but it locked up someones machine (back then compiling for all targets concurrently). So maybe we should consider limiting the parallelism.

If we intend parallelism to the number of cores on the machine, then we should consider that hooks might use more than one core. Some build systems allow cooperative scheduling:

More conservatively, we could consider only compiling hooks in parallel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onpackage:hooks_runner

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions