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

Update benchmark and MemoryManager fixes #521

Merged
merged 5 commits into from
Oct 24, 2023
Merged

Conversation

CedNaru
Copy link
Member

@CedNaru CedNaru commented Oct 19, 2023

Upgraded the benchmarks we left in the dust for way too long.
I had the terrible idea of never running it after doing the memory rework for Godot 4. I discovered a few leaks with the stress tests so I fixed them. I had to add a lock again in the BindingManager, which I don't like.
I also suspect that Refcounted can leak in certain cases as well but to be sure, we'll have to wait for multithreading to properly work so I can test it in the correct condition, but I'm not fixing it until I see it happening. The consequence will likely be to expand the use of the spinlock to the reference callback.

That solution right now is a "band aid", we are using a single spinlock for all binding operations, even when it's for 2 unrelated objects that won't interfere with each other.
I'll try a difference design once we switch to Godot 4.2, and I can start implementing #508. (Probably use some SafeFlag in the KotlinBinding instead).

I removed the C# files because we didn't even implement all the tests with them back in Godot 3 anyway.
(Don't worry about the removed .gdj, they are obsolete files from a previous PR that never got deleted)

As a side effect, also implement #506

@CedNaru CedNaru requested review from chippmann and piiertho October 19, 2023 00:45
@CedNaru CedNaru linked an issue Oct 23, 2023 that may be closed by this pull request
@CedNaru CedNaru merged commit f19d2bc into master Oct 24, 2023
@CedNaru CedNaru deleted the fix/updateBenchmarks branch October 24, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rework MemoryManager's update frequency.
2 participants