Expose a zero allocation API to Godot C# bindings
### Describe the project you are working on Godot C# bindings ### Describe the problem or limitation you are having in your project For the past weeks, I've been discussing with several Unity users intending to move to Godot C# regarding dealing with the C# garbage collector. The most common complaint I hear from users is that, in Unity, allocations can trigger unexpected GC spikes into the game. In Godot, we target to make all of the high performance APIs (those that intended to be called every frame) not allocate any memory, so theoretically the GC should not be a problem. Additionally, Godot starting from 4.0, uses the Microsoft CoreCLR version of .net, which also supposedly has a better garbage collector than Unity. But in all, after several discussions with Unity users, neither is enough reassurance for them, and they would really feel safer if Godot exposed a zero allocation API. ### Describe the feature / enhancement and how it helps to overcome the problem or limitation The idea of this proposal is that Godot exposes zero allocation versions of many functions in the C# API, that users can use if they desire. Technically, this could be done from the binding generator itself, without breaking compatibility, and without doing any modification to Godot itself. ### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams **WARNING** I am not familiar with C#, so take this as pseudocode. Imagine you have two functions exposed as to
Posted by reduz on Sep 24, 2023, 4:29 PM
Tags
Related issues
- I wish there was something that could be done beyond feeling powerless.
- I don’t hate taxes per se but I hate that the government will take tax dollars earmarked for one purpose, which is how they got the tax a...
- I've never thought SF Symbols were beautiful.
- > conservatives don't like being told that their ideas, while legally allowed, are not welcome in polite company As long as there are a ...
- Yeah but this AI music is worse than any AI produced code.
- I wish there was a way I could get educational-only youtube as an adult.
Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments
complaint (Other)
I wish there was something that could be done beyond feeling powerless.
NewI don’t hate taxes per se but I hate that the government will take tax dollars earmarked for one purpose, which is how they got the tax a...
NewI've never thought SF Symbols were beautiful.
New> conservatives don't like being told that their ideas, while legally allowed, are not welcome in polite company As long as there are a ...
NewYeah but this AI music is worse than any AI produced code.
I wish there was a way I could get educational-only youtube as an adult.
people say taste is the differentiator but I hate that because taste is personal, whereas culture is communal taste without curation for...
I've always enjoyed hacking on random projects and AI does that really well.
Expose a zero allocation API to Godot C# bindings
### Describe the project you are working on Godot C# bindings ### Describe the problem or limitation you are having in your project For the past weeks, I've been discussing with several Unity users intending to move to Godot C# regarding dealing with the C# garbage collector. The most common complaint I hear from users is that, in Unity, allocations can trigger unexpected GC spikes into the game. In Godot, we target to make all of the high performance APIs (those that intended to be called every frame) not allocate any memory, so theoretically the GC should not be a problem. Additionally, Godot starting from 4.0, uses the Microsoft CoreCLR version of .net, which also supposedly has a better garbage collector than Unity. But in all, after several discussions with Unity users, neither is enough reassurance for them, and they would really feel safer if Godot exposed a zero allocation API. ### Describe the feature / enhancement and how it helps to overcome the problem or limitation The idea of this proposal is that Godot exposes zero allocation versions of many functions in the C# API, that users can use if they desire. Technically, this could be done from the binding generator itself, without breaking compatibility, and without doing any modification to Godot itself. ### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams **WARNING** I am not familiar with C#, so take this as pseudocode. Imagine you have two functions exposed as to
Comments (0)
No comments yet. Start the discussion.