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

napi: Improve performance creating strings #26439

Closed
wants to merge 4 commits into from

Conversation

@anthony-tuininga
Copy link
Contributor

commented Mar 4, 2019

Improve performance creating strings using N-API by ensuring that the strings are not internalized (see Node issue #26437).

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Improve performance creating strings using N-API by ensuring that the…
… strings

are not internalized (see Node issue #26437).
@addaleax
Copy link
Member

left a comment

Thank you!

@addaleax addaleax added the n-api label Mar 4, 2019

@addaleax

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

CI: https://ci.nodejs.org/job/node-test-pull-request/21197/

(Travis is going to complain about the commit message, but you can ignore that, it’s information for the person who lands the commit, not necessarily the author.)

@mhdawson

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

This seems to confirm the preference for kNormal as the safer default choice. https://groups.google.com/forum/#!topic/v8-users/xoqi4ee8x74

@mhdawson
Copy link
Member

left a comment

LGTM

@jasnell
jasnell approved these changes Mar 4, 2019
@mhdawson

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

@anthony-tuininga thanks for your work on this.

@anthony-tuininga

This comment has been minimized.

Copy link
Contributor Author

commented Mar 5, 2019

You're welcome. Thanks for the quick turnaround on the approvals! Would love to see this released in 8.x and 10.x as well so that our users won't see a performance hit when upgrading to the next version of our module (in which we hope to use N-API).

Let me know if you want me to add the checks in the other string creation methods yet or if that should be deferred for another issue and PR?

@addaleax

This comment has been minimized.

Copy link
Member

commented Mar 5, 2019

Let me know if you want me to add the checks in the other string creation methods yet or if that should be deferred for another issue and PR?

If it’s all the same to you, I’d rather do it now/here. :)

@anthony-tuininga

This comment has been minimized.

Copy link
Contributor Author

commented Mar 5, 2019

Ok. I'll add the checks here. One moment.

@mhdawson

This comment has been minimized.

Copy link
Member

commented Mar 5, 2019

@anthony-tuininga I agree with wanting to get this back to 10.x and 8.x if possible. I've already added the tags so that we consider doing that.

@anthony-tuininga

This comment has been minimized.

Copy link
Contributor Author

commented Mar 5, 2019

Great. Let me know if you need anything further from me.

@joyeecheung

This comment has been minimized.

BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 8, 2019
n-api: improve performance creating strings
Improve performance creating strings using N-API by ensuring that the
strings are not internalized.

Added test cases for latin-1 and utf-16 strings.

PR-URL: nodejs#26439
Fixes: nodejs#26437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

Landed in 914d908

@anthony-tuininga congratulations to your first commit to Node.js! 🎉

I fixed the commit message to adhere to our commit guidelines while landing.

@BridgeAR BridgeAR closed this Mar 8, 2019

BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 12, 2019
n-api: improve performance creating strings
Improve performance creating strings using N-API by ensuring that the
strings are not internalized.

Added test cases for latin-1 and utf-16 strings.

PR-URL: nodejs#26439
Fixes: nodejs#26437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 13, 2019
n-api: improve performance creating strings
Improve performance creating strings using N-API by ensuring that the
strings are not internalized.

Added test cases for latin-1 and utf-16 strings.

PR-URL: nodejs#26439
Fixes: nodejs#26437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR added a commit that referenced this pull request Mar 14, 2019
n-api: improve performance creating strings
Improve performance creating strings using N-API by ensuring that the
strings are not internalized.

Added test cases for latin-1 and utf-16 strings.

PR-URL: #26439
Fixes: #26437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@anthony-tuininga anthony-tuininga referenced this pull request Apr 3, 2019
MylesBorins added a commit that referenced this pull request Apr 5, 2019
n-api: improve performance creating strings
Improve performance creating strings using N-API by ensuring that the
strings are not internalized.

Added test cases for latin-1 and utf-16 strings.

PR-URL: #26439
Fixes: #26437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins

This comment has been minimized.

Copy link
Member

commented Apr 5, 2019

I've landed on 10.x and 8.x

MylesBorins added a commit that referenced this pull request Apr 5, 2019
n-api: improve performance creating strings
Improve performance creating strings using N-API by ensuring that the
strings are not internalized.

Added test cases for latin-1 and utf-16 strings.

PR-URL: #26439
Fixes: #26437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins added a commit that referenced this pull request Apr 16, 2019
n-api: improve performance creating strings
Improve performance creating strings using N-API by ensuring that the
strings are not internalized.

Added test cases for latin-1 and utf-16 strings.

PR-URL: #26439
Fixes: #26437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BethGriggs BethGriggs referenced this pull request May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.