@nrwl/linter: builder execution is almost 2 times slower than raw eslint
See original GitHub issueCurrent Behavior
nrwl linter builder is almost 2 times (sometimes even more) slower in comparison with raw eslint execution
demonstration on project that contains 2 files only:
nrwl linter
eslint
Expected Behavior
Execute linting with same speed like raw eslint
Steps to Reproduce
Failure Logs
Environment
@nrwl/angular : Not Found
@nrwl/cli : 9.5.1
@nrwl/cypress : 9.5.1
@nrwl/eslint-plugin-nx : 9.5.1
@nrwl/express : Not Found
@nrwl/jest : 9.5.1
@nrwl/linter : 9.5.1
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 9.5.1
@nrwl/react : 9.5.1
@nrwl/schematics : Not Found
@nrwl/tao : 9.5.1
@nrwl/web : 9.5.1
@nrwl/workspace : 9.5.1
typescript : 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Which eslint rules in my config are slow? - Stack Overflow
eslint shows the spent times of rules if the environment variable TIMING is set. For example: $ TIMING=1 eslint lib Rule | Time...
Read more >@nrwl/linter:eslint | Nx
Read more about how to configure targets and executors here: ... The basic way is to provide only lintFilePatterns , which is a...
Read more >The ultimate migration guide to angular-eslint, ESLint and Nx 11
How to set up a new Nx workspace using angular-eslint or migrate an ... This guide assumes that Nx CLI version 11.x is...
Read more >Speeding Up ESLint - Medium
Today, I happened to notice that on my project of 8 files, it's equally slow with the whole project as it is with...
Read more >Adding ESLint and Cypress to a New Angular Project
(I pointed out only the changes here). The angular.json has changes as well. A lint property was added with the appropriate builders. {...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I ran into
@nrwl/nx/enforce-module-boundaries
being slow the other day. I think there are two parts that contribute to it:Unfortunately no…
measurements
I did additional measurements this morning on different library. those time deltas are much smaller, so maybe it was my system overloaded or something (up time was 42 days previously - I rebooted this morning)
Files linted: 7
3 types of execution:
1. raw eslint
TIMING=1 yarn eslint --ext .ts,.tsx,.js libs/analytics
measurement:
2. run-command builder
TIMING=1 yarn nx run analytics:lint-manual --skip-nx-cache
architect:
measurement:
3. lint builder
TIMING=1 yarn nx run analytics:lint --skip-nx-cache
architect:
measurement:
observations
@nrwl/workspace:run-commands
is the slowest even though just executing underlying raw binary. I think this should be investigated a bit more as I’d expect similar number to raw binary execution (eslint)@nrwl/nx/enforce-module-boundaries
is the main slow down of linting process ( I’d investigate this further and add some perf tweaks to that package. Maybe just TS bump to 3.9 will improve the situation on it’s own)Lemme know if you need anything more from my side.