Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Performance Slowdown from TSLint 3.x to 5.x #2729

Closed
danbucholtz opened this issue May 10, 2017 · 4 comments
Closed

Performance Slowdown from TSLint 3.x to 5.x #2729

danbucholtz opened this issue May 10, 2017 · 4 comments

Comments

@danbucholtz
Copy link

I am working on updating Ionic Framework apps to go from TSLint 3.x to 5.x. I have noticed a significant performance slow down when working in the same environment.

With version 3.x, we consistently see lint operations complete in about ~1.25-1.4 seconds.
With version 5.x, we consistently see lint operations complete in ~4 seconds.

This is with the exact same rule set (minimal) on the exact same project (same source, etc).

Here is our default tslint.json config file. Here is the code we currently use for running TSLint (3.x). Here is the proposed code for TSLint 5.x.

What else can I provide to help you triage and resolve the issue?

Thanks,
Dan

@ghost
Copy link

ghost commented May 10, 2017

So you're only using 2 lint rules?
no-unused-variable now creates a Program so it can use TypeScript's implementation (#2235), which may explain the slowdown there.

@adidahiya
Copy link
Contributor

Yeah, I don't think there's much we can do here. You can bring back the old implementation of no-unused-variable as a custom lint rule, but we're not going to do that in core TSLint. As usual I'm going to recommend migrating to the tsc options noUnusedParameters & noUnusedLocals, if possible.

@danbucholtz
Copy link
Author

Creating a program is a synchronous operation, correct? Perhaps we can work with TS team to provide an async option to speed this up.

Thanks,
Dan

@ghost
Copy link

ghost commented May 11, 2017

I don't think that would provide a huge benefit because TypeScript doesn't spend much of its time in I/O.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants