Uh oh!
There was an error while loading. Please reload this page.
src,tools: speed up startup by 2.5% - #5458
Conversation
bnoordhuis
commented
Feb 26, 2016
I didn't test but I expect that the speed-up on slower systems will be even more significant. |
There was a problem hiding this comment.
Isn't this under-indented?
There was a problem hiding this comment.
We don't really seem to have a convention for indentation in macros but two spaces appears to be most common:
$ perl -ne 'if (/define V\(/ && /\\$/) { <> =~ /^(\s+)/; print "| ", length($1), " spaces\n" }' src/*.{cc,h} | sort | uniq -c | sort -nr
16 | 2 spaces
7 | 4 spaces
1 | 6 spaces
1 | 30 spaces
jasnell
commented
Mar 2, 2016
LGTM |
jasnell
commented
Mar 2, 2016
Marking as don't land on v4 for now... can potentially revisit that if the v8 limitation is lifted there also |
bnoordhuis
commented
Mar 2, 2016
Crikey, looks like VS 2013 expands the macro wrong... 2015 gets it right but that's not much comfort. |
jasnell
commented
Mar 3, 2016
O.o ... that's fun. VS 2013 is always full of wonderful surprises. |
79f85ba to
90aa74bComparebnoordhuis
commented
Mar 5, 2016
CI with workaround: https://ci.nodejs.org/job/node-test-pull-request/1860/ |
bnoordhuis
commented
Mar 5, 2016
And another workaround... https://ci.nodejs.org/job/node-test-pull-request/1862/ |
bnoordhuis
commented
Mar 5, 2016
One more VS fix-up... https://ci.nodejs.org/job/node-test-pull-request/1865/ |
bnoordhuis
commented
Mar 5, 2016
Make that https://ci.nodejs.org/job/node-test-pull-request/1867/, Jenkins crapped out. |
bnoordhuis
commented
Mar 6, 2016
And again because the Windows status page kept timing out... https://ci.nodejs.org/job/node-test-pull-request/1870/ |
jasnell
commented
Mar 7, 2016
Appears to be a significant bit of breakage on one of the windows machines. |
jasnell
commented
Mar 21, 2016
@bnoordhuis ... ping |
7da4fd4 to
c7066fbCompare563fad5 to
364e887Comparebnoordhuis
commented
May 13, 2016
Updated, PTAL. CI: https://ci.nodejs.org/job/node-test-pull-request/2641/ |
364e887 to
85481f7Comparebnoordhuis
commented
Jun 29, 2016
Rebased: https://ci.nodejs.org/job/node-test-pull-request/3120/ Can I get a LGTM? |
eljefedelrodeodeljefe
commented
Jun 29, 2016
LGTM |
eljefedelrodeodeljefe
commented
Jun 29, 2016
For the record: "Everything old is new again!" Is my absolute favourite commit of all time. Is there a place where making VS2015 requirement for compilation was discussed? Probably not so easy, right? But definitely much more comfortable. |
Fishrock123
commented
Jun 29, 2016
@bnoordhuis It looks like win2008r2 VS2013 totally failed? |
c133999 to
83c7a88Compare69c38fe to
abaa566Comparebnoordhuis
commented
Oct 24, 2016
Dusted off and rebased. CI: https://ci.nodejs.org/job/node-test-pull-request/4654/ |
Use zero-copy external string resources for storing the built-in JS source code. Saves a few hundred kilobyte of memory and consistently speeds up `benchmark/misc/startup.js` by 2.5%. Everything old is new again! Commit 74954ce ("Add string class that uses ExternalAsciiStringResource.") from 2011 did the same thing but I removed that in 2013 in commit 34b0a36 ("src: don't use NewExternal() with unaligned strings") because of a limitation in the V8 API. V8 no longer requires that strings are aligned if they are one-byte strings so it should be safe to re-enable external strings again. PR-URL: nodejs#5458 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
abaa566 to
e4290deCompareevanlucas
commented
Nov 2, 2016
Can this land on v7? |
bnoordhuis
commented
Nov 3, 2016
Yes, it's semver-patch. |
Use zero-copy external string resources for storing the built-in JS source code. Saves a few hundred kilobyte of memory and consistently speeds up `benchmark/misc/startup.js` by 2.5%. Everything old is new again! Commit 74954ce ("Add string class that uses ExternalAsciiStringResource.") from 2011 did the same thing but I removed that in 2013 in commit 34b0a36 ("src: don't use NewExternal() with unaligned strings") because of a limitation in the V8 API. V8 no longer requires that strings are aligned if they are one-byte strings so it should be safe to re-enable external strings again. PR-URL: #5458 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
* Those from v7 are causing memory insufficiency when compiling * cf. nodejs/node#5458
MylesBorins
commented
Jan 23, 2017
I've gone ahead and backported this to v6.x. I believe it has spent enough time maturing on v7.x Please feel free to let me know if you think it needs to spend more time before backport |
Use zero-copy external string resources for storing the built-in JS source code. Saves a few hundred kilobyte of memory and consistently speeds up `benchmark/misc/startup.js` by 2.5%. Everything old is new again! Commit 74954ce ("Add string class that uses ExternalAsciiStringResource.") from 2011 did the same thing but I removed that in 2013 in commit 34b0a36 ("src: don't use NewExternal() with unaligned strings") because of a limitation in the V8 API. V8 no longer requires that strings are aligned if they are one-byte strings so it should be safe to re-enable external strings again. PR-URL: #5458 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Use zero-copy external string resources for storing the built-in JS source code. Saves a few hundred kilobyte of memory and consistently speeds up `benchmark/misc/startup.js` by 2.5%. Everything old is new again! Commit 74954ce ("Add string class that uses ExternalAsciiStringResource.") from 2011 did the same thing but I removed that in 2013 in commit 34b0a36 ("src: don't use NewExternal() with unaligned strings") because of a limitation in the V8 API. V8 no longer requires that strings are aligned if they are one-byte strings so it should be safe to re-enable external strings again. PR-URL: #5458 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Use zero-copy external string resources for storing the built-in JS source code. Saves a few hundred kilobyte of memory and consistently speeds up `benchmark/misc/startup.js` by 2.5%. Everything old is new again! Commit 74954ce ("Add string class that uses ExternalAsciiStringResource.") from 2011 did the same thing but I removed that in 2013 in commit 34b0a36 ("src: don't use NewExternal() with unaligned strings") because of a limitation in the V8 API. V8 no longer requires that strings are aligned if they are one-byte strings so it should be safe to re-enable external strings again. PR-URL: #5458 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Use zero-copy external string resources for storing the built-in JS source code. Saves a few hundred kilobyte of memory and consistently speeds up `benchmark/misc/startup.js` by 2.5%. Everything old is new again! Commit 74954ce ("Add string class that uses ExternalAsciiStringResource.") from 2011 did the same thing but I removed that in 2013 in commit 34b0a36 ("src: don't use NewExternal() with unaligned strings") because of a limitation in the V8 API. V8 no longer requires that strings are aligned if they are one-byte strings so it should be safe to re-enable external strings again. PR-URL: nodejs/node#5458 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Use zero-copy external string resources for storing the built-in JS
source code. Saves a few hundred kilobyte of memory and consistently
speeds up
benchmark/misc/startup.jsby 2.5%.Everything old is new again! Commit 74954ce ("Add string class that
uses ExternalAsciiStringResource.") from 2011 did the same thing but
I removed that in 2013 in commit 34b0a36 ("src: don't use NewExternal()
with unaligned strings") because of a limitation in the V8 API.
V8 no longer requires that strings are aligned if they are one-byte
strings so it should be safe to re-enable external strings again.
CI: https://ci.nodejs.org/job/node-test-pull-request/1763/