Skip to content

Speed up engine flutter/tools/gn by not running python code #144430

@zanderso

Description

@zanderso

This script can take anywhere from 1.5 to >10 seconds to run on an M1 mac, which is too slow.

It is slow because our GN files spawn python scripts using the exec_script() function, and those python scripts can be slow for various reasons.

The slow scripts can be identified by examining the traces in chrome tracing format that are written under the root build output directory, e.g. out/host_debug_unopt/gn_trace.json.

In many cases, it should be possible to shift these scripts to run as gclient hooks as in flutter/engine#50957 and flutter/buildroot#825.

cc @johnmccutchan

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions