-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Terrible performance on Windows if home directory is on network share #447
Comments
Thanks for the report, I have one question: do you run PHPMD from your home directory or from your project root? |
I run it from the project root which is a subdirectory of my Windows user's profile directory (which itself is a directory below C:\Users and equal to %USERPROFILE%). Example:
|
PDepend user cache lies in HOME as it is for
You should compare with some other tools that use the same principle such as: |
I set the HOME environment variable to my Windows user profile directory (say C:\Users\foo) long ago, ever since I found that this accelerates starting commands like vim from Git Bash. Note that my Windows user profile directory is on the internal SSD. No performance problems due to network or slow HDD there. |
Found it: if ((PHP_OS === 'Darwin') || (PHP_OS === 'CYGWIN') || (false === stripos(PHP_OS, 'win'))) {
return getenv('HOME');
}
return getenv('HOMEDRIVE') . getenv('HOMEPATH'); This is how PDepend find the home path. I guess we should first get |
Makes sense, sounds good to me! :) |
…and HOMEPATH if HOME doesn't exist. pdepend#447
On the next version or yet in dev-master you can now set custom directory to HOME for any OS. |
@InvisibleSmiley I am going to close this issue as the related PR has been merged. We identified a general issue with the file caching mechanism of PDepend, which we will track in another issue. Please try to make use of the now available |
Current Behavior
Calling PHPMD (2.8.1) with a simple file takes ~6 seconds on Windows if your home directory is on a network share.
Expected Behavior
The performance should be equal (or very similar) to that if a pdepend.xml / pdepend.xml.dist is present in the directory to be checked with PHPMD (~0.4 seconds).
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: