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

Caching on Windows makes CS check incredibly slow #3558

Closed
jrfnl opened this issue Mar 13, 2022 · 1 comment
Closed

Caching on Windows makes CS check incredibly slow #3558

jrfnl opened this issue Mar 13, 2022 · 1 comment

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Mar 13, 2022

Describe the bug

I've done some - not entirely scientific - benchmark checks and am finding that enabling the caching option when on Windows (not sure about other OSes), makes a CS run significantly slower.

For a CS run with a custom ruleset and the following command over 57 files:

phpcs ./inc/ --sniffs=Squiz.Commenting.FunctionComment,Universal.Operators.StrictComparisons,Generic.CodeAnalysis.EmptyPHPStatement,PHPCompatibility.ParameterValues.NewHTMLEntitiesFlagsDefault,PSR12.Files.FileHeader,Squiz.Commenting.InlineComment,WordPress.WP.PostsPerPage

These are the approximate timings I'm seeing:

Checked against Time with cache ON Time without cache OFF (--no-cache)
master Time: 3 mins, 5.61 secs; Memory: 78MB Time: 3.7 secs; Memory: 36MB

Expected behavior
I would expect a little bit of a slow-down the first time PHPCS is run with cache turned on as the cache file needs to be written, but the slow-down I'm seeing now is out of bounds.

Versions (please complete the following information):

  • OS: Windows 10
  • PHP: 8.1.2
  • PHPCS: master, but also checked 3.6.2 tag
  • Standard: custom

Additional context
I haven't done a git bisect yet to figure out if I can pinpoint the slow-down to a specific commit, but felt that the time difference is so huge and on the negative for having caching turned on, this had to be reported forthwith.

@jrfnl
Copy link
Contributor Author

jrfnl commented Dec 2, 2023

Closing as replaced by PHPCSStandards/PHP_CodeSniffer#26

@jrfnl jrfnl closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant