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 wish I could post a PR for this, but I don't know where to start, so this is more of a question about how to handle this :
My software creates a potentially big hierarchy of nested DynamicObject (can go more than 10k).
this hierarchy is passed to the JS engine via registerNativeObject, this can be a bit long to convert (JucetoQuickJs function) but it's manageable when it's only on script init.
Those objects have C-Function methods that return other parts of the hierarchy, like getParent(levelToSearch), getChild(nameOfTheChild), getSpecificTypeOfChildren(type), etc.
My problem is that when I call one of those methods, the returned object is fully converted (JuceToQuickJS) during function return, even though the returned object already has been converted and exists in the hierarchy. This result in a very slow processing time because those returned objects can be big as they get near top-level of the hierarchy.
I don't know how the previous engine was dealing with this, but it was definitely not having the same conversion time, or not even doing conversions.
So my question is : is there a way to return a reference of already converted JS-objects instead of having to reconvert a new object each time ?
EDIT :
I think what would be interesting is that, either by default or as an option, in the juceToQuickJs and quickJsTojuce functions, there is a way to detect if the var is a DynamicObject pointer, and if it is, then check it already exists in the context, and if it does, only return its corresponding QuickJS / JUCE equivalent. This would avoid having to recursively convert everything all the time.
Thank you
What is the expected behaviour?
It would be great that the engine detects that this object already has been registered , then it passes its reference instead of manually converting everything everytime.
Operating systems
Windows
What versions of the operating systems?
11
Architectures
64-bit
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
The bug is present on the develop branch
Code of Conduct
I agree to follow the Code of Conduct
The text was updated successfully, but these errors were encountered:
Detailed steps on how to reproduce the bug
I wish I could post a PR for this, but I don't know where to start, so this is more of a question about how to handle this :
My software creates a potentially big hierarchy of nested DynamicObject (can go more than 10k).
this hierarchy is passed to the JS engine via registerNativeObject, this can be a bit long to convert (JucetoQuickJs function) but it's manageable when it's only on script init.
Those objects have C-Function methods that return other parts of the hierarchy, like
getParent(levelToSearch), getChild(nameOfTheChild), getSpecificTypeOfChildren(type)
, etc.My problem is that when I call one of those methods, the returned object is fully converted (JuceToQuickJS) during function return, even though the returned object already has been converted and exists in the hierarchy. This result in a very slow processing time because those returned objects can be big as they get near top-level of the hierarchy.
I don't know how the previous engine was dealing with this, but it was definitely not having the same conversion time, or not even doing conversions.
So my question is : is there a way to return a reference of already converted JS-objects instead of having to reconvert a new object each time ?
EDIT :
I think what would be interesting is that, either by default or as an option, in the juceToQuickJs and quickJsTojuce functions, there is a way to detect if the var is a DynamicObject pointer, and if it is, then check it already exists in the context, and if it does, only return its corresponding QuickJS / JUCE equivalent. This would avoid having to recursively convert everything all the time.
Thank you
What is the expected behaviour?
It would be great that the engine detects that this object already has been registered , then it passes its reference instead of manually converting everything everytime.
Operating systems
Windows
What versions of the operating systems?
11
Architectures
64-bit
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the
develop
branchThe bug is present on the
develop
branchCode of Conduct
The text was updated successfully, but these errors were encountered: