-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
module searching is VERY slow for me #100
Comments
Would you be interested to work on this? I think this would be an awesome improvement, but a little complicated. Right now when you run So we'd need to bail on first find, but keep the search available so we don't waste time when starting to search for another one. |
Ah I see. I can try to look at some point, but I probably won't have time for a while. Thanks for clarifying though! |
BTW the main issue is discussed over here, and looks like I figured out the root cause. I'll push a fix soon. We still could optimize the yeoman-environment logic itself like discussed earlier. |
This bug should be fixed with #127 |
Maybe this option should be enabled by default. |
This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days |
I'm seeing issues with the way path searching works that make it VERY slow. If i say
yo foo
, it takes about 30 seconds to get to the first prompt. It seems like I should be able to do something to make it faster. I'll try to explain my setup.I have a generator called
generator-foo
and I am currently moving it to my monorepo calledfoo
. Both the old generator-foo folder and the new foo folder (the monorepo) are at /Users/bwain/dev. The new generator that lives in the monorepo is at /Users/bwain/dev/foo/generator-foo. The way I call the generator is to sayyo foo
from a package.json script at the root of the monorepo. It doesn't globally install the generator or yo or anything.I've noticed that the slowness is when searching paths (in findGeneratorsIn). One of the main ones it spends a lot of time on is /Users/bwain/dev, which has a lot of projects in it. I don't see why it should be searched though, because that's out of my project completely.
The issues seems to be this line https://github.com/yeoman/environment/blob/master/lib/resolver.js#L140
Commenting it out sped up the generator start time from 30 seconds to 6. I don't think the location of my projects folder should matter though. If anything, the search should bail out early as soon as it finds a valid generator, assuming it searches in priority order.
The text was updated successfully, but these errors were encountered: