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

Object allocation is slower since 4.0.beta9 #70853

Closed
maldrasen opened this issue Jan 2, 2023 · 7 comments · Fixed by #81037
Closed

Object allocation is slower since 4.0.beta9 #70853

maldrasen opened this issue Jan 2, 2023 · 7 comments · Fixed by #81037

Comments

@maldrasen
Copy link

Godot version

v4.0 beta9

System information

Windows 11, 64bit

Issue description

Since migrating from Beta 8 to Beta 10, I've noticed a serious performance hit. I've tracked the problem down to a place where I'm creating a couple thousand objects. The object allocation used to take a couple microseconds, but ever since Beta 9 it takes hundreds of microseconds to construct a new object.

Steps to reproduce

Create a plain Godot class that extends Object. Create a few thousand of them. It takes a while.

Minimal reproduction project

AllocationExample.zip

@Calinou Calinou changed the title Object allocation is slow Object allocation is slower since 4.0.beta9 Jan 2, 2023
@Calinou Calinou added this to the 4.0 milestone Jan 2, 2023
@Calinou
Copy link
Member

Calinou commented Jan 2, 2023

If you can compile the engine from source, you could look into bisecting the regression to greatly speed up troubleshooting.

@maldrasen
Copy link
Author

OK, I'll see what I can find.

@KoBeWi
Copy link
Member

KoBeWi commented Jan 3, 2023

I didn't test much, but I remember having this problem and that it might be fixed on newest master.

@maldrasen
Copy link
Author

That would be awesome if so. I haven't been able to build from source yet, so I've yet to test it on master.

@KoBeWi
Copy link
Member

KoBeWi commented Jan 3, 2023

Beta 11 might be released soon, so you will be able to test easily.

@clayjohn
Copy link
Member

Can you still reproduce this issue using Beta 14?

@clayjohn clayjohn modified the milestones: 4.0, 4.x Jan 26, 2023
@bitsawer
Copy link
Member

Thanks for the report. This was fixed by #81037, so closing as completed. I tested the MRP and it's much faster now.

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

Successfully merging a pull request may close this issue.

5 participants