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

feat: make postject faster #86

Merged
merged 2 commits into from
May 18, 2023

Conversation

RaisinTen
Copy link
Contributor

@RaisinTen RaisinTen commented May 15, 2023

This change replaces the vecFromJSArray() call in vec_from_val() with a call to convertJSArrayToNumberVector(), which reduces the time consumption of Postject from ~30s to ~6s on a Mach-O Node.js binary when run on my x86_64 macOS.

Fixes: #85
Refs: emscripten-core/emscripten#11119
CI: https://app.circleci.com/pipelines/github/RaisinTen/postject/8/workflows/6ac6bd04-5249-4c36-8daa-f86e8a52d7db

This change replaces the [`vecFromJSArray()`](https://emscripten.org/docs/api_reference/val.h.html?highlight=vecfromjsarray#_CPPv4N10emscripten10emscripten3val14vecFromJSArrayERK3val)
call in `vec_from_val()` with a
call to [`convertJSArrayToNumberVector()`](https://emscripten.org/docs/api_reference/val.h.html?highlight=convertjsarraytonumbervector#_CPPv4N10emscripten10emscripten3val28convertJSArrayToNumberVectorERK3val),
which reduces the time consumption of Postject from ~30s to ~6s on a
Mach-O Node.js binary when run on my x86_64 macOS.

Fixes: nodejs#85
Refs: emscripten-core/emscripten#11119
Signed-off-by: Darshan Sen <raisinten@gmail.com>
Copy link
Member

@tony-go tony-go left a comment

Choose a reason for hiding this comment

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

lgtm code-wise 🚀

Copy link
Member

@robertgzr robertgzr left a comment

Choose a reason for hiding this comment

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

awesome!

@RaisinTen RaisinTen merged commit 7533f2c into nodejs:main May 18, 2023
2 checks passed
@RaisinTen RaisinTen deleted the feat/make-postject-faster branch May 18, 2023 12:29
RaisinTen added a commit to RaisinTen/node that referenced this pull request May 22, 2023
The recent Postject upgrade, nodejs#48072,
included a performance improvement for the injection operation
(see nodejs/postject#86), so now it might be
possible to run the SEA tests on the ppc64 architecture runners on
Jenkins, which was previously getting timed out.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
nodejs-github-bot pushed a commit to nodejs/node that referenced this pull request May 24, 2023
The recent Postject upgrade, #48072,
included a performance improvement for the injection operation
(see nodejs/postject#86), so now it might be
possible to run the SEA tests on the ppc64 architecture runners on
Jenkins, which was previously getting timed out.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: #48111
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit to nodejs/node that referenced this pull request May 30, 2023
The recent Postject upgrade, #48072,
included a performance improvement for the injection operation
(see nodejs/postject#86), so now it might be
possible to run the SEA tests on the ppc64 architecture runners on
Jenkins, which was previously getting timed out.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: #48111
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit to nodejs/node that referenced this pull request Jul 6, 2023
The recent Postject upgrade, #48072,
included a performance improvement for the injection operation
(see nodejs/postject#86), so now it might be
possible to run the SEA tests on the ppc64 architecture runners on
Jenkins, which was previously getting timed out.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: #48111
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
The recent Postject upgrade, nodejs#48072,
included a performance improvement for the injection operation
(see nodejs/postject#86), so now it might be
possible to run the SEA tests on the ppc64 architecture runners on
Jenkins, which was previously getting timed out.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: nodejs#48111
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
The recent Postject upgrade, nodejs#48072,
included a performance improvement for the injection operation
(see nodejs/postject#86), so now it might be
possible to run the SEA tests on the ppc64 architecture runners on
Jenkins, which was previously getting timed out.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: nodejs#48111
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
The recent Postject upgrade, nodejs#48072,
included a performance improvement for the injection operation
(see nodejs/postject#86), so now it might be
possible to run the SEA tests on the ppc64 architecture runners on
Jenkins, which was previously getting timed out.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: nodejs#48111
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate why running the wasm blob in Postject is slow
5 participants