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

Investigate if using QueueFree instead of Free always is better #3667

Closed
84634E1A607A opened this issue Aug 6, 2022 · 4 comments
Closed

Comments

@84634E1A607A
Copy link
Contributor

It looks like Free takes a lot of performance. May want to always use QueueFree.

@hhyyrylainen
Copy link
Member

hhyyrylainen commented Aug 6, 2022

QueueFree takes time at the end of a frame for Godot to process. I would imagine the overall performance impact is the exact same, but it's just that Godot internally needs to spend all the time freeing the resources.

Edit: also there are some cases where things must be freed immediately otherwise the existing resources that exist as child nodes until the end of the frame causes issues.

@hhyyrylainen hhyyrylainen changed the title Use QueueFree instead of Free Investigate if using QueueFree instead of Free always is better Aug 6, 2022
@84634E1A607A
Copy link
Contributor Author

They are basically the same. (Free() and QueueFree() 10000 buttons both take 12.5s on my end)

@Seubmarine
Copy link

godotengine/godot#62444 this pr is speeding freeing time if necessary

@hhyyrylainen
Copy link
Member

Does that affect the relative performance impact of Free versus QueueFree?

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

No branches or pull requests

3 participants