From 13e5f8c91da8e9c8dfe37e5a45483186e06e9009 Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Mon, 3 Feb 2025 15:58:39 -0800 Subject: [PATCH] Run web benchmarks at -O2 to evaluate performance. (#162625) As per https://github.com/flutter/flutter/issues/162620, we are going to run the web benchmarks at `-O2` for a trial period to evaluate the performance difference, which will give us some data on whether we can consider changing to `-O2` by default. --- dev/devicelab/lib/tasks/web_benchmarks.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/devicelab/lib/tasks/web_benchmarks.dart b/dev/devicelab/lib/tasks/web_benchmarks.dart index c50e8254ce..e672cf18e3 100644 --- a/dev/devicelab/lib/tasks/web_benchmarks.dart +++ b/dev/devicelab/lib/tasks/web_benchmarks.dart @@ -38,7 +38,8 @@ Future runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async { options: [ 'web', '--no-tree-shake-icons', // local engine builds are frequently out of sync with the Dart Kernel version - if (benchmarkOptions.useWasm) ...['-O4', '--wasm', '--no-strip-wasm'], + '-O2', + if (benchmarkOptions.useWasm) ...['--wasm', '--no-strip-wasm'], '--dart-define=FLUTTER_WEB_ENABLE_PROFILING=true', '--profile', '--no-web-resources-cdn',