Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upVery slow initialization of `codeclimate analyze` unless all `node_modules` directories are not made available to Docker #912
Comments
|
Hi @jonahwh, can you please share the contents of your |
|
|
@jonahwh apologies for my very delayed reply here, I haven't had much time to look at this. Unfortunately I'm having trouble reproducing this. I do have one shot-in-the-dark suggestion: instead of using The reason I suggest this is that if you have a particularly large/deep That being said, 30 secs to walk a directory tree would have to be a very, very large directory tree. So if that doesn't help, I'd like to ask a few follow up questions.
|
|
I have faced the same issue. For somewhat reason, global exclusion pattern didn't help to deal with node_modules. The workaround is to add explicit paths for duplication engine:
|


This seems similar to #238
When running
codeclimate analyze(or just directly invoking docker) in a project with anynode_modulesfolders, the command hangs for a while (usually in my case, just over 30 seconds) before actually starting analysis.If we do any of the following, the analysis runs as speedily as expected:
node_modulesfolder in the projectnode_modulesfoldersnode_modulesfolder, via docker flags, e.g.- "**/node_modules/"is in ourexclude_patternssetting in.codeclimate.yml, and even if we wait for codeclimate to start with all thenode_modulesfolders intact, the engines don't run on them, but it seems the excluded files are still being scanned before any engines start up.Some output:
Without cleaning up
node_modules~37 seconds
With cleaning up
node_modulesby any method mentioned above<1 second