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

Performance issues when have multiple entries #52

Closed
minhtranite opened this issue Dec 26, 2016 · 7 comments
Closed

Performance issues when have multiple entries #52

minhtranite opened this issue Dec 26, 2016 · 7 comments

Comments

@minhtranite
Copy link

Currently I have a project with about 15 webpack entries. Each entry have own stylesheet file. And here is webpack build time:

  • With stylelint-webpack-plugin:
webpack building...
webpack built 832650538a0ff1527328 in 21824ms

webpack building...
webpack built 832650538a0ff1527328 in 13755ms
  • Without stylelint-webpack-plugin
webpack built 832650538a0ff1527328 in 8009ms
webpack building...
webpack built 832650538a0ff1527328 in 194ms
webpack building...
webpack built 832650538a0ff1527328 in 204ms
@mciastek
Copy link

mciastek commented Jan 2, 2017

I have encountered same issue. Without stylelint-webpack-plugin build takes approx. 300ms. With stylelint-webpack-plugin it takes 10x slower, approx. 3s. What cause that performance issue?

@renatorib
Copy link

renatorib commented Jan 9, 2017

Same issue here.

Without plugin: 500ms
With plugin: 3800ms

@JaKXz
Copy link
Contributor

JaKXz commented Jan 9, 2017

Thanks for reporting this! Would anyone like to take a crack at a PR / investigating? This may also be an upstream issue with stylelint itself.

@sergesemashko
Copy link
Contributor

sergesemashko commented Jan 17, 2017

It seems like the performance issue here is with stylelint itself. I ran just stylelint task alone and had the approximately the same linting time.
As a workaround:

  1. Use lintDirtyFilesOnly: true flag, which makes plugin to lint only touched files. The PR with flag was merged into master, but not released yet.
  2. (Needs work) Skip linting of good files and lint only failed files, which I suggested in another issue. Basically, it is a cache implementation.

Of course, fundamentally, performance issue should be solved on stylelint level, because it has the biggest impact.
There are some thoughts about that in the comment.

@beckend
Copy link

beckend commented Sep 28, 2017

How about forking the stylelint process instead?

@JaKXz
Copy link
Contributor

JaKXz commented Dec 13, 2017

@beckend would you be willing to make a PR that demonstrates what you're suggesting? I'd be interested in something like that if we could write simple integration tests for it :)

@shellscape
Copy link
Contributor

Closing as stale due to age and inactivity. If there is still interest in this issue, please do submit a pull request.

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

No branches or pull requests

7 participants