[analyzer] Train snapshot more than --help

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 <rmacnak@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This commit is contained in:
Jens Johansen 2022-11-15 10:49:51 +00:00 committed by Commit Queue
parent 39c68314f2
commit 60029641af

View file

@ -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"),
]
}