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

More efficient (Raw)ObjectId loading #230

Open
daboross opened this issue Aug 20, 2019 · 0 comments · May be fixed by #512
Open

More efficient (Raw)ObjectId loading #230

daboross opened this issue Aug 20, 2019 · 0 comments · May be fixed by #512
Labels
C-upstream Issue blocked by an upstream problem/feature.

Comments

@daboross
Copy link
Collaborator

Right now, RawObjectId::from_packed_js_val does a fairly inefficient transition which involves three calls into JS to get three different integer values.

I think it'd be more efficient if we instead exposed a raw [u32; 3] chunk of memory to JavaScript, and had it write the three integers into our array directly. Unfortunately, this requires a mutable UnsafeTypedArray. That existing is tracked at koute/stdweb#360.

@ASalvail ASalvail added the C-upstream Issue blocked by an upstream problem/feature. label Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-upstream Issue blocked by an upstream problem/feature.
Projects
None yet
2 participants