Skip to content

Conversation

triniwiz
Copy link
Member

@triniwiz triniwiz commented Nov 8, 2023

Using the new annotations to improve the runtime for our jni calls
@cla-bot cla-bot bot added the cla: yes label Nov 8, 2023
Comment on lines +47 to 57
@FastNative
private native void runModule(int runtimeId, String filePath) throws NativeScriptException;

@FastNative
private native void runWorker(int runtimeId, String filePath) throws NativeScriptException;

@FastNative
private native Object runScript(int runtimeId, String filePath) throws NativeScriptException;

@FastNative
private native Object callJSMethodNative(int runtimeId, int javaObjectID, String methodName, int retType, boolean isConstructor, Object... packagedArgs) throws NativeScriptException;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if these should be FastNative. FastNative completely disables GC while it's running, and these could likely run for a good while.

callJSMethodNative is even trickier because we can go java->native->java->native multiple times in long running methods

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the fastest we can go for those would be !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants