Closed mike-potter closed 7 years ago
Adding the following:
->exclude(['node_modules', 'bower_components'])
in processProjectPackages() helps, but still slows down composer. Not really sure what else to try.
Oh, I think I found the problem! When I inspect the $directory argument being passed to processProjectPackages(), it is always passing the top-level folder (folder I am running composer-install from). It is not the folder of the specific package being installed. Thus, it is not only searching the node_modules and bower_components within our theme, it is re-searching every single package over and over. Seems like it should only be searching within the package currently being installed.
Working on a PR for this.
This issue is resolved by PR #3
@mike-potter PR #3 merged
Once this package is loaded by composer, the rest of my composer packages install or uninstall much much slower. This is likely due to the fact that our site has both node_modules and bower_components directories that contain many files, and drupal-console-extend is searching those folders.
This was a problem in the past with drush and Drupal core that was fixed. It's very important to provide a way to exclude certain folders from any file searching.
I'll see if I can come up with a PR to fix this, but interested in comments on how best to do that here.