-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Potential performance improvements #137
Comments
/cc @ricardogobbosouza What do you think? |
What is the goal? Lint only modified files? or lint all files in the graph? We already have a config to only lint modified files. Though, I like the new api hooks, I didn't know of them when worked on this last. |
The idea is to lint all files on the initial run and then lint only changed files on next compilations. Maybe it would be also worth to provide "files" option to the plug-in to specify files to lint (so we can start linting early also on the initial run). We could then filter-out errors coming from files outside of the dependency graph and lint files that were missing (which hopefully will be 0). We can easily have files outside of the dependency graph - for example if you have typescript file that contains types only, this file will not become part of the dependency graph. |
We made effort to ignore files out of the graph on purpose. If memory serves, we toss a job at a worker pool for every file discovered. It doesn't wait for the finished callback to lint, only to report. We only re-lint modified files. The performance difference you're seeing may be overhead of the worker pool? |
I don't think so, it's ~20-second difference. @eamodio, did you experience this difference on the initial compilation, or in the next compilations? |
Yeah, initial compilation was about a 20s difference, but even on change it seemed slower too. |
The idea of using graph files is exactly to be faster, even more that we use workers Could you share a repository that can prove this slowness? |
Machine details would help too. I could believe this plugin is a little biased to very-wide CPUs. (ie: being less ideal for low-core counts) |
I just pushed a branch here: https://github.com/gitkraken/vscode-gitlens/tree/feature/eslint-webpack -- that switches from using eslint from Using that same branch, just 1 commit back (e.g. using I'm running on Windows 11 (
I've also tried to enable threading -- using Hope that helps! |
|
I confirm @eamodio problem. |
Did you mean when you are using I recently ran into the above problem: when using |
Correct, when using |
Any progress on this issue? With |
I'm not sure if this is related, but for me, sometimes when macOS 12.4 M1 Max |
I just tried this again, since |
Revisited this again and it seems that things have gotten even worse. Without using caching, Setting Is there any planned progress here? Or how best can the community help? |
FWIW, I created a new webpack plugin for ESLint: https://github.com/eamodio/eslint-lite-webpack-plugin/ |
@eamodio we can emrge your soluiton here, do you want to send a PR (if you need diccusion - welcome ⭐ ) |
@alexander-akait While I would be all for getting the improvements back in here, I don't personally have the bandwidth as I believe it would be fairly tricky. I took a lot of assumptions, required versions, limited config, no fix support, logging that matches (or improves on) the output of I would happily support anyone attempting to bring it back in though -- and FWIW the new plugin is quite simple. |
Hi! 👋 I'm an author of ForkTsCheckerWebpackPlugin. I recently removed support for EsLint in the plugin to focus on the TypeScript part. The eslint-webpack-plugin is a suggested replacement, but some users experience performance degradation when switching to this plugin (TypeStrong/fork-ts-checker-webpack-plugin#601) (for example from ~24s to ~40s).
Modification Proposal
Use
compiler.modifiedFiles
to get a list of files to lint andcompiler.removedFiles
to get a list of files to remove errors. This way you don't have to wait forcompilation.hooks.finishModules
to start the linting process.Expected Behavior / Situation
The
eslint-webpack-plugin
has similar performance tofork-ts-checker-webpack-plugin@^6.0.0
Actual Behavior / Situation
The
eslint-webpack-plugin
is often significantly slower.Please paste the results of
npx webpack-cli info
here, and mention other relevant informationI believe it's not related :)
The text was updated successfully, but these errors were encountered: