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

Possible Performance Improvment for the Generated Wrappers #21

Open
GeorgeS2019 opened this issue Apr 28, 2024 · 3 comments
Open

Possible Performance Improvment for the Generated Wrappers #21

GeorgeS2019 opened this issue Apr 28, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@GeorgeS2019
Copy link

GeorgeS2019 commented Apr 28, 2024

Feedback

It is amazing that the wrapper codes generated WORKS!
However, the performance needs to be addressed based on previous feedback from others.

I could be wrong. Hopefully we all learn together.

Reference1

This means consuming GDExtensions is currently possible, but not ideal (because we lose type safety).

  • The bindings generator retrieves everything from ClassDB and generates the glue, we would probably need to refactor it so we can allow generating only certain classes (like the ones registered through GDExtensions).

==> Addressed here

The generated bindings source code use unsafe code blocks which would require user projects to also enable unsafe code blocks and, in my opinion, this is not acceptable.

==> here we are not generating unsafe code

Reference2

Don't use ClassDB.Call/Set/Get in the core of the engine for C# bindings as I have.

Reference3

the situation is similar to interop with GDScript, where you would also rely on GodotObject (or ClassDB I guess)

Reference4

It may be possible to use C# Source Generators to generate the proxy types for GDExtension types when building the C# project, but as far as I know no one has started working on this at the moment.

Relevant only to GDMP

@GeorgeS2019

This comment was marked as off-topic.

@Delsin-Yu

This comment was marked as off-topic.

@Delsin-Yu
Copy link
Owner

Reference 2 and 3 (ClassDB-based APIs) are what we are using currently, there is performance improvement we can make based on that.

Reference 4 provides the best performance and integration, but yes, that requires implementing it in the Engine.

@Delsin-Yu Delsin-Yu changed the title Preliminary Feedback based on GDMP Possible Performance Improvment for the Generated Wrappers Apr 28, 2024
@Delsin-Yu Delsin-Yu added the enhancement New feature or request label Apr 29, 2024
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

2 participants