Uh oh!
There was an error while loading. Please reload this page.
lib,src: split up big builtin scripts - #2714
Conversation
Reduces the body of parsed source code from 210 kb to 80 kb for a null program (`node -e 0`) and from 255 kb to 190 kb for a one-liner that prints some output to the console. It doesn't seem to have much impact on the size of the generated code (on my system I see an 8% reduction with --nolazy and 3% without) but hopefully it speeds up startup on slow systems because there is now less source code to parse.
cjihrig
commented
Sep 6, 2015
Looks like this PR is affected by the issue with 617ee32. |
ChALkeR
commented
Sep 6, 2015
@cjihrig All the PRs that were published (or rebased) in the last few days need to be rebased now. |
517062d to
42e9c45Comparebnoordhuis
commented
Sep 6, 2015
Ah, it wasn't like that when I opened the PR this morning. Anyway, rebased and new CI started: https://ci.nodejs.org/job/node-test-pull-request/256/ |
There was a problem hiding this comment.
EventEmitter at the end could be removed along with this change I guess.
bnoordhuis
commented
Sep 6, 2015
thefourtheye
commented
Sep 6, 2015
@bnoordhuis npm 2.14.2 has graceful-fs ~4.1.2 as its dependency. That has the fix which you proposed. |
Fishrock123
commented
Sep 6, 2015
@bnoordhuis could you send me some |
bnoordhuis
commented
Sep 6, 2015
@Fishrock123 E.g. here:
|
bnoordhuis
commented
Sep 6, 2015
I guess the problem is that npm and node-gyp depend on different versions of graceful-fs.... |
bnoordhuis
commented
Sep 6, 2015
@thefourtheye Thanks for filing that node-gyp pull request but I don't think that's going to be enough, there's a whole bunch of npm dependencies that depend on outdated versions of graceful-fs: |
thefourtheye
commented
Sep 6, 2015
@bnoordhuis I'll submit a patch to those packages now. But then even if they upgrade, we can land this only after npm picks up the upgraded dependencies, right? |
bnoordhuis
commented
Sep 6, 2015
Yes, that's right. |
othiym23
commented
Sep 6, 2015
Just so everyone is clear, even were we to land all those PRs today (which we're not going to do, because this is the middle of a long holiday weekend in the US, and also those changes need to go through our release process, and probably, y,know, be tested), it's at least two Thursdays until the patched version of npm would be ready for downstream use. This strongly argues against including this PR in Node 4.0.0, unless everyone is cool with waiting that long. Big thanks to @thefourtheye for taking the time to put those PRs together. |
thefourtheye
commented
Sep 6, 2015
As mentioned in the PR,
we can assume that it may not be targeted for 4.0.0 (@bnoordhuis please correct if I am wrong).
You are welcome 😊 |
bnoordhuis
commented
Sep 6, 2015
Nope, that's right; I wasn't planning on landing this in v4.x. |
There was a problem hiding this comment.
This seems like it should be unnecessary, since _stream_duplex's export is hoisted.
Fishrock123
commented
Sep 8, 2015
@Trott You know you can make a new label if you need to right? :) |
graceful-fs used to monkey-patch node's core fs module. This has been fixed in the version 4. Related: nodejs/node#2714 PR-URL: #3
graceful-fs used to monkey-patch node's core fs module. This has been fixed in the version 4. Related: nodejs/node#2714 PR-URL: #4
graceful-fs used to monkey-patch node's core fs module. This has been fixed in the version 4. Related: nodejs/node#2714 PR-URL: #64
othiym23
commented
Sep 11, 2015
In |
Fishrock123
commented
Oct 10, 2015
@bnoordhuis npm now ships with all those patches by default, so the above concerns seem to be met now. |
Fishrock123
commented
Jan 13, 2016
@bnoordhuis is this still a thing you'd like to do? |
bnoordhuis
commented
Feb 12, 2016
Closing, stale. Now that it's possible to add our own code to the snapshot, that's probably a better solution anyway. |
Reduces the body of parsed source code from 210 kb to 80 kb for a null
program (
node -e 0) and from 255 kb to 190 kb for a one-liner thatprints some output to the console.
It doesn't seem to have much impact on the size of the generated code
(on my system I see an 8% reduction with --nolazy and 3% without) but
hopefully it speeds up startup on slow systems because there is now
less source code to parse.
Do not merge yet; this is an experiment and for soliciting feedback.
See #2138.
CI: https://ci.nodejs.org/job/node-test-pull-request/255/