You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm asking this question a little out of ignorance about how performant or not performant the ES6 proxy is. But is there any sort of mechanism to assign a c++ method to be called when an undefined* property or index is used from JS?
*undefined - meaning not part of the prototype created by "DefineClass" or added to the instance of the class when its instantiated.
The ES6 Proxy would more than suffice for what I want to do. However based on some testing I've seen people online do, it seems like there is a noticeable slow down when you use a proxy. I am not really concerned about how performant it would be for small use cases. But what I am building could potentially access and iterate over 10s-100s of millions of properties that really only exist on a wrapped object. So if I can get some efficiency out of writing an addon class I would rather do that than use a proxy.
The text was updated successfully, but these errors were encountered:
I think your concern remotely relates to #1114. Unfortunately there is no Node-API to achieve what you are trying to accomplish. I think the Proxy method is the only way. Take a look at the thread and see the conversation for some details.
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.
I'm asking this question a little out of ignorance about how performant or not performant the ES6 proxy is. But is there any sort of mechanism to assign a c++ method to be called when an undefined* property or index is used from JS?
The ES6 Proxy would more than suffice for what I want to do. However based on some testing I've seen people online do, it seems like there is a noticeable slow down when you use a proxy. I am not really concerned about how performant it would be for small use cases. But what I am building could potentially access and iterate over 10s-100s of millions of properties that really only exist on a wrapped object. So if I can get some efficiency out of writing an addon class I would rather do that than use a proxy.
The text was updated successfully, but these errors were encountered: