Update: measure plugin loading time and output in debug message #12395
Conversation
|
LGTM, thanks! We usually ask for an RFC before most core changes, but I think this is trivial enough that we shouldn't need one here. But let's see what other team members think. |
|
I should qualify: This looks good, outside of the CLA check. Please let us know if you run into issues while fixing the commits to allow the CLA check to pass. Thanks! |
|
LGTM. I don't think we need RFC for this. |
|
Marking as "evaluating" for now, but we can change to "accept" if nobody from the team objects to this change. |
01dc24b
to
ad9c276
|
LGTM, thanks! |
|
I'm marking this as "accepted", since the team has had plenty of time to review and there is no objection so far. I'll leave this open for another day or so, and then merge. |
364877b
into
eslint:master
16 checks passed
16 checks passed
continuous-integration (Test on Node.js 12 (Windows))
Test on Node.js 12 (Windows) succeeded
Details
This was referenced Nov 9, 2019
This was referenced Mar 11, 2020
This was referenced Mar 26, 2020
This was referenced Apr 3, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[X] Other, please explain:
What changes did you make? (Give an overview)
I've added measurement of loading time for each plugin. Times are shown in debug output.
The reason is in unexpectedly significant startup time for some plugins, even when there is nothing to check for them. One possible example:
typescript-eslintplugin added.tsfiles (only.js, so ESLint is still launched, but there is nothing fortypescript-eslintto check)In this example
typescript-eslintplugin is still loaded and consumes more than half a second to load typescript-eslint/typescript-eslint#1040More examples:
So in case you added these four plugins, ESLint will require 1.5s to start. It's significant for both CLI tools and for pre-commit hooks. I'd like to know exact timings in order to tune ESLint configuration (pre-commit hook may have the fastest one, CI configuration should have the slowest one).
Is there anything you'd like reviewers to focus on?