From 60029641af8f6b2e25913e9b3ae94cb89c73b222 Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Tue, 15 Nov 2022 10:49:51 +0000 Subject: [PATCH] [analyzer] Train snapshot more than --help MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The analyzer snapshot is currently "trained" with `--help`, i.e. not really trained at all. Doing some archaeology, it actually used to be trained, but it was disabled in https://dart-review.git.corp.google.com/c/sdk/+/77228 because of Fuchsia issues (https://github.com/dart-lang/sdk/issues/34616). Although the troublesome stuff was perhaps fixed in https://dart-review.git.corp.google.com/c/sdk/+/77422 it was seemingly never re-enabled. That was 2018. This CL re-enables it, taking an initial uncached analysis of dart2js to ~51% (~9.5s vs ~18.6s), of the analyzer to ~75% (~22.2s vs ~29.6) and of the front_end to ~50% (~7.7s vs ~15.2s). This won’t change the peak performance of the analyzer, but will certainly - as seen above - make it faster when first loaded. Change-Id: I613e6a5b52d00da15948cf936f20ea36ad28818e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269683 Reviewed-by: Ryan Macnak Commit-Queue: Jens Johansen --- utils/analysis_server/BUILD.gn | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/utils/analysis_server/BUILD.gn b/utils/analysis_server/BUILD.gn index d8d0cea8e84..8d2be9f47ae 100644 --- a/utils/analysis_server/BUILD.gn +++ b/utils/analysis_server/BUILD.gn @@ -7,9 +7,7 @@ import("../application_snapshot.gni") application_snapshot("analysis_server") { main_dart = "../../pkg/analysis_server/bin/server.dart" training_args = [ - "--help", - # TODO(34616): This is broken on Fuchsia. - # "--sdk=" + rebase_path("../../sdk/"), - # "--train-using=" + rebase_path("../../pkg/analyzer_cli") + "--sdk=" + rebase_path("../../sdk/"), + "--train-using=" + rebase_path("../../pkg/compiler/lib"), ] }