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

Caching obj_callp invocations #188

Open
fwsGonzo opened this issue Oct 24, 2024 · 2 comments
Open

Caching obj_callp invocations #188

fwsGonzo opened this issue Oct 24, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@fwsGonzo
Copy link
Collaborator

fwsGonzo commented Oct 24, 2024

Right now obj_callp invocations are slower than when using GDScript very likely because GDScript caches the object-method combination. We should be doing the same, similar to what godot-cpp does.

It's not obvious how to cache an obj-callp call: How do you get a unique class identifier? How do you get a unique method identifier? I suppose the method can be just a hash, but the class? Also a hash?

Even with all these pre-requisites lined up, how do you look up the method call, before calling it?

@fwsGonzo fwsGonzo added the enhancement New feature or request label Oct 24, 2024
@fwsGonzo
Copy link
Collaborator Author

It may be easier to do this with the run-time generated API, as it provides us the means to use hashes on both sides to communicate these known calls.

@fwsGonzo
Copy link
Collaborator Author

One idea here is to modify the guest variants to match the expected arguments, but handle the data as untrusted and verify it based on that. After that it makes sense to ship that to the known function with the expected arguments.

Not sure if enough scrunity.

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

No branches or pull requests

1 participant