Skip to content
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

parserOptions slow down linting significantly #319

Closed
luixo opened this issue Feb 25, 2019 · 3 comments
Closed

parserOptions slow down linting significantly #319

luixo opened this issue Feb 25, 2019 · 3 comments
Labels
triage Waiting for team members to take a look

Comments

@luixo
Copy link

luixo commented Feb 25, 2019

I am trying to migrate gradually from tslint to typescript-eslint. On my attempt to incorporate @typescript-eslint/tslint/config the linting became extremly slow. Fiddling around with the configuration file, I found out that the problem is in the parserOptions property.
Mine looks quite minimalistic:

parserOptions: {
    project: 'tsconfig.json'
}

I run ESLint several times with and without parserOptions and benchmarked the timings (based on 10 runs):

Linter configuration Time
ESLint with parserOptions 15s
ESLint without parserOptions 3s

I'm not sure if that much of a slowdown is unevitable or it's just a malconfiguration of some sort.

Versions

package version
@typescript-eslint/eslint-plugin-tslint 1.4.1
@typescript-eslint/parser 1.4.0
TypeScript 3.3.3
ESLint 5.14.1
node 8.9.4
npm 5.8.0
@luixo luixo added the triage Waiting for team members to take a look label Feb 25, 2019
@OCJvanDijk
Copy link

Duplicate of #243 I think

@armano2
Copy link
Member

armano2 commented Feb 26, 2019

Duplicate of #243

@armano2 armano2 marked this as a duplicate of #243 Feb 26, 2019
@armano2 armano2 closed this as completed Feb 26, 2019
@armano2 armano2 reopened this Feb 26, 2019
@armano2 armano2 closed this as completed Feb 26, 2019
@bradzacher
Copy link
Member

It's a known issue because of eslint runs each file isolated, so we're currently paying the initialisation cost of the type checker in every single file (which is slow and means a lot of duplicated work).

Tracked in #134, #243

@typescript-eslint typescript-eslint locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage Waiting for team members to take a look
Projects
None yet
Development

No branches or pull requests

4 participants