-
Notifications
You must be signed in to change notification settings - Fork 506
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
perf hit from NanFromV8String #3
Comments
@trevnorris would you mind if I added you as a collaborator to this repo? I'd love to have your contributions since you know the node internals much better than I. |
Sure. Ironically I started to throw together some convenience stuff and threw it |
OK, I've added you. Since this is a download-from-github project, we'd better do everything off-master until stuff is ready for "release". I have an 0.2.0 branch on the go already. pull-request for additions and major fixes would be appreciated so there can be discussion too. Will have a look at njsutil. Thanks! |
Any updates on this? I just started reimplementing node::StringBytes, but it seems necessary to add most of it, which create a fair amount of clutter -- assuming we want to stick to a single file. I assume the same issue will arise when backporting node::Cached. |
I'd prefer a single header file if possible, but if we need to add a compiled unit then it could be added as an optional extra perhaps? With some instructions on what to put in your .gyp file, or just export a full .gyp with instructions on how to depend on it in your own .gyp. But if possible, lets try and cram it all in to a header. if it's a matter of just making the header file too big.. well, I'm not sure I'm too concerned about that, as long as we can try and keep it relatively well organised. It'll compact nicely enough in the .tgz published packages. |
Yes, sounds reasonable. Might want to wrap parts in #ifdefs if they may or may not be wanted. On closer inspection of this particular issue, it seems like I can get by with a lot less code. I might have a semi-working draft done in an hour or two. |
970421b contains a work in progress. It still requires some fixing and I am not sure on e.g. when zero terminators need to be added, e.g. should buffers get an extra terminating zero? |
I think this one is finally sorted out. Closing. |
Two things are going to kick you:
utf8
is going to kill performance. I might allow users to passenum encoding
innode.h
to allow a specific encoding output.memcpy
.A lot of this is properly addressed in
node::StringBytes::Encode
. But since that doesn't exist pre v0.11, maybe just use it for a reference.The text was updated successfully, but these errors were encountered: