Skip to content

Commit b0610be

Browse files
authored
[web] Don't collect trace info in the color grid benchmark (flutter#54396)
1 parent bb02f40 commit b0610be

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dev/benchmarks/macrobenchmarks/lib/src/web/bench_text_layout.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,16 @@ class BenchBuildColorsGrid extends WidgetBuildRecorder {
215215
BenchBuildColorsGrid.canvasKit()
216216
: mode = _TestMode.useCanvasKit, super(name: canvasKitBenchmarkName);
217217

218+
/// Disables tracing for this benchmark.
219+
///
220+
/// When tracing is enabled, DOM layout takes longer to complete. This has a
221+
/// significant effect on the benchmark since we do a lot of text layout
222+
/// operations that trigger synchronous DOM layout.
223+
///
224+
/// Tracing has a negative effect only in [_TestMode.useDomTextLayout] mode.
225+
@override
226+
bool get isTracingEnabled => false;
227+
218228
static const String domBenchmarkName = 'text_dom_color_grid';
219229
static const String canvasBenchmarkName = 'text_canvas_color_grid';
220230
static const String canvasKitBenchmarkName = 'text_canvas_kit_color_grid';

0 commit comments

Comments
 (0)