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

Skip node resolution only for non-relative requires. #2976

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

cpojer
Copy link
Member

@cpojer cpojer commented Feb 22, 2017

Summary

@voideanvalue and I talked about this about six months ago but I never got to it. Basically we have a lot of "missing" modules because of our PHP JS modules at FB and every resolution of "MyModule" is really slow (there are thousands). However, we can still resolve relative requires quickly. This change skips likely node modules but keeps resolving relative requires without a noticeable performance hit.

Test plan

At FB, this now takes 5 seconds instead of 70.

@cpojer
Copy link
Member Author

cpojer commented Feb 22, 2017

I should add that this makes reverse dependency graphs more useful.

@voideanvalue voideanvalue merged commit 3002e05 into jestjs:master Feb 22, 2017
skovhus pushed a commit to skovhus/jest that referenced this pull request Apr 29, 2017
@cpojer cpojer deleted the resolution branch May 4, 2017 15:44
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants