-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Conversation
FreeBSD fails looks unrelated. |
Out of curiosity, how much of a speed up is this? |
Nothing spectacular, it's on the order of 50-100 us per file on my system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(the pending status of |
c133999
to
83c7a88
Compare
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>
cfcc70f
to
d52f5dc
Compare
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>
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>
hey @bnoordhuis should this be backported? Assuming it needs more time to bake either way |
It could be back-ported but it doesn't need to be, it's not a bug fix. |
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 |
CI: https://ci.nodejs.org/job/node-test-pull-request/4540/