Uh oh!
There was an error while loading. Please reload this page.
test: speed up stringbytes-external test - #3005
Conversation
evanlucas
commented
Sep 22, 2015
mscdex
commented
Sep 22, 2015
LGTM |
1 similar comment
trevnorris
commented
Sep 22, 2015
LGTM |
trevnorris
commented
Sep 22, 2015
CI: https://ci.nodejs.org/job/node-test-pull-request/363/ EDIT: immediate scroll from top to bottom omitted showing the first CI in my browser window. |
There was a problem hiding this comment.
These allocations need to be after the try catch else it would fail on Raspberry Pi 1/2.
There was a problem hiding this comment.
awesome save. Thanks for catching this.
evanlucas
commented
Sep 22, 2015
Weird...it seems like the test is slower on all of the CI machines with this? Locally, it is about a 20% improvement... |
There was a problem hiding this comment.
Probably, buf2 can be moved below and created only when it is actually used.
47d5f36 to
ebc1aefCompareevanlucas
commented
Sep 22, 2015
Made some changes with the help of @trevnorris. Should be improved quite a bit more now. New CI: https://ci.nodejs.org/job/node-test-pull-request/368/ |
There was a problem hiding this comment.
Can't we slice this off the Buffer allocated in the try..catch above?
There was a problem hiding this comment.
That would work. my worry is that we allocate 256MB more than needed above, and if we hang on to that then the tests that turn these into strings will need to increase the heap by an additional 256MB. Hence why over allocating in the check above is a small way to ensure the heap has enough space for the toString() calls below.
silverwind
commented
Oct 1, 2015
This is still haunting the CI, LGTM. The improvement looks to be around 20% right now, still worth it imho: |
evanlucas
commented
Oct 1, 2015
@mscdex and @trevnorris mind taking a look again since changes have been made since your signed off on it? |
trevnorris
commented
Oct 1, 2015
Changes LGTM |
trevnorris
commented
Oct 1, 2015
Maybe this will need to be broken into two tests so as to not exceed the time limit. |
evanlucas
commented
Oct 2, 2015
You want me to go ahead and do that? |
silverwind
commented
Oct 2, 2015
I think I'd also prefer a split, but that can be done in another PR. |
trevnorris
commented
Oct 5, 2015
@evanlucas Don't worry about splitting it now. We can handle that later. If CI on latest changes is happy then I'd say land it. (on vacation ATM so can't do it myself) |
evanlucas
commented
Oct 5, 2015
evanlucas
commented
Oct 5, 2015
Still failing on arm. I've got a Pi2 I'm messing with locally, so will try to split the test up and see if that helps |
trevnorris
commented
Oct 6, 2015
@evanlucas Still wouldn't worry about the failing tests on arm. They were failing before. This PR is an incremental improvement, and splitting the test up can happen in another PR. I move we land this as is. |
test-stringbytes-external tends to take quite a while on slower hardware. A lot of the time is taken by creating a new buffer that is very large. The improvements come from reusing the same buffer. PR-URL: nodejs#3005 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
evanlucas
commented
Oct 6, 2015
Landed in 7d66749. Thanks! |
test-stringbytes-external tends to take quite a while on slower hardware. A lot of the time is taken by creating a new buffer that is very large. The improvements come from reusing the same buffer. PR-URL: #3005 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
test-stringbytes-external tends to take quite a while on slower
hardware. A lot of the time is taken by creating a new buffer that is
very large. The improvements come from reusing the same buffer.
Before:
After:
Related: #2370
R= @trevnorris