-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Update: measure plugin loading time and output in debug message #12395
Update: measure plugin loading time and output in debug message #12395
Conversation
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, 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! |
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. 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
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, 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. |
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-eslint
plugin added.ts
files (only.js
, so ESLint is still launched, but there is nothing fortypescript-eslint
to check)In this example
typescript-eslint
plugin 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?