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

src: speed up module loading #9132

Merged
merged 2 commits into from
Oct 24, 2016

Conversation

bnoordhuis
Copy link
Member

@bnoordhuis bnoordhuis commented Oct 17, 2016

@bnoordhuis bnoordhuis added c++ Issues and PRs that require attention from people who are familiar with C++. module Issues and PRs related to the module subsystem. labels Oct 17, 2016
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Oct 17, 2016
@jbergstroem
Copy link
Member

FreeBSD fails looks unrelated.

@mscdex
Copy link
Contributor

mscdex commented Oct 17, 2016

Out of curiosity, how much of a speed up is this?

@bnoordhuis
Copy link
Member Author

Nothing spectacular, it's on the order of 50-100 us per file on my system.

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jbergstroem
Copy link
Member

(the pending status of windows-fanned is a bug we have with reporting build updates from jenkins)

@rvagg rvagg force-pushed the master branch 2 times, most recently from c133999 to 83c7a88 Compare October 18, 2016 17:02
@bnoordhuis
Copy link
Member Author

One more CI run because the previous one had infrastructure issues: https://ci.nodejs.org/job/node-test-pull-request/4648/

Stop reading from disk when we read fewer bytes than requested because
the next read will be the zero-sized EOF.

PR-URL: nodejs#9132
Reviewed-By: James M Snell <jasnell@gmail.com>
Don't bother shrinking the read buffer on the final read because we
dispose it immediately afterwards.  Avoids some unnecessary memory
allocation and copying.

PR-URL: nodejs#9132
Reviewed-By: James M Snell <jasnell@gmail.com>
@bnoordhuis bnoordhuis closed this Oct 24, 2016
@bnoordhuis bnoordhuis deleted the speed-up-module-loading branch October 24, 2016 20:32
@bnoordhuis bnoordhuis merged commit d52f5dc into nodejs:master Oct 24, 2016
evanlucas pushed a commit that referenced this pull request Nov 2, 2016
Stop reading from disk when we read fewer bytes than requested because
the next read will be the zero-sized EOF.

PR-URL: #9132
Reviewed-By: James M Snell <jasnell@gmail.com>
evanlucas pushed a commit that referenced this pull request Nov 2, 2016
Don't bother shrinking the read buffer on the final read because we
dispose it immediately afterwards.  Avoids some unnecessary memory
allocation and copying.

PR-URL: #9132
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins
Copy link
Contributor

hey @bnoordhuis should this be backported? Assuming it needs more time to bake either way

@bnoordhuis
Copy link
Member Author

It could be back-ported but it doesn't need to be, it's not a bug fix.

@MylesBorins MylesBorins added the baking-for-lts PRs that need to wait before landing in a LTS release. label May 8, 2017
@MylesBorins MylesBorins added dont-land-on-v6.x and removed baking-for-lts PRs that need to wait before landing in a LTS release. lts-watch-v6.x labels Nov 14, 2017
@MylesBorins
Copy link
Contributor

setting don't land on this for v6.x for now. Please feel free to let me know if you think we should re consider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. module Issues and PRs related to the module subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants