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

lib: optimize require() path walking #130

Merged
merged 1 commit into from
Dec 9, 2014

Conversation

bnoordhuis
Copy link
Member

Remove a speed bump from commit 36777d2 by reusing the result of the
previous stat() system call. It's a code path that gets called many
thousands of times at startup in most applications so shaving off an
extra system call can have an appreciable impact on startup times.

R=@chrisdickinson @robertkowalski

@chrisdickinson
Copy link
Contributor

LGTM. Tempted to say add null to the other places tryFile is called to avoid the arguments adaptor, but that is the tiniest of tiny nits, which you can feel free to ignore if you'd like :)

Remove a speed bump from commit 36777d2 by reusing the result of the
previous stat() system call.  It's a code path that gets called many
thousands of times at startup in most applications so shaving off an
extra system call can have an appreciable impact on startup times.

PR-URL: nodejs#130
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
@bnoordhuis bnoordhuis merged commit ddf17f9 into nodejs:v0.12 Dec 9, 2014
@bnoordhuis bnoordhuis deleted the optimize-require-path-walking branch December 9, 2014 21:13
@bnoordhuis
Copy link
Member Author

Incorporated feedback and landed in ddf17f9. Thanks, Chris!

@robertkowalski
Copy link
Contributor

just came home, awesome work! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants