debugProfileBuildsEnabled top-level property

bool debugProfileBuildsEnabled
getter/setter pair

Adds Timeline events for every Widget built.

The timing information this flag exposes is not representative of the actual cost of building, because the overhead of adding timeline events is significant relative to the time each object takes to build. However, it can expose unexpected widget behavior in the timeline.

In debug builds, additional information is included in the trace (such as the properties of widgets being built). Collecting this data is expensive and further makes these traces non-representative of actual performance. This data is omitted in profile builds.

For more information about performance debugging in Flutter, see docs.flutter.dev/perf/ui-performance.

See also:

Implementation

bool debugProfileBuildsEnabled = false;