-
Notifications
You must be signed in to change notification settings - Fork 72
[hooks_runner] Optimize the no hooks path #2302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR HealthAPI leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
2 similar comments
PR HealthAPI leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
PR HealthAPI leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
048ec58
to
cc6fc7b
Compare
cc6fc7b
to
177bea1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -40,7 +41,7 @@ class KernelAssets { | |||
}, | |||
}; | |||
|
|||
return yamlEncode(yamlContents); | |||
return const JsonEncoder.withIndent(' ').convert(yamlContents); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see a future reader stumbling over this line and wondering why we encode yaml with the Json encoder. Can you leave a comment or fix the naming?
Bug: #2236
Optimize the code paths for when there are no hooks (speeds up standalone Dart).
After this the longest running part in
dartdev
is loading thepackage_config.json
: 10 ms. We can't really avoid this because we need that info to check whether we have any hooks that need running. And thepackage_config.json
isn't already loaded by dartdev (in contrast toflutter_tools
where we have aPackageConfig
object available). dartdev delegates compilation topackage:pub
(!) viagetExecutableForCommand
and that API uses the package config file path. dart-lang/pub#4067