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

Windows: Make MSVC debug CRT opt-in (debug_crt=yes) #69609

Merged

Conversation

akien-mga
Copy link
Member

Follow-up to #69294 which enabled it automatically for dev_build=yes, but this seems to cause some issues.
Those issues should likely be debugged but until then this can stay opt-in

Follow-up to godotengine#69294 which enabled it automatically for `dev_build=yes`,
but this seems to cause some issues.
Those issues should likely be debugged but until then this can stay opt-in.
@YuriSizov
Copy link
Contributor

YuriSizov commented Dec 5, 2022

Can confirm that now by default builds don't cause extreme slowdowns. This is true even with the language server doing its thing on startup when you have Godot Tools enabled in VS Code.

However, with debug_crt=yes I also don't get slowdowns anymore... I've tried rebuilding it 2 times, without the flag then with it. It does a complete rebuild, and yet it doesn't cause the issue anymore. I've tried adding a print statement to make sure that the build goes through the correct branch, and it does, it prints as expected. And I do get that "abort" message when I close one of my projects.

Going back to the current master doesn't cause a rebuild at all (because all the compiler flags match, I guess?). So I went to the last commit before you've introduced your original change, built that, checked that there was no issue, switched to the latest commit in master, and built again, and it worked still.

So I'm confused... I've tested a few different commits earlier today, trying to pinpoint the regression. It was absolutely repeatable every time I tried the one from #69294 or later, but it was clear for multiple commits before that. What.

Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I'll tentatively approve this, since it restores the status quo and makes it unlikely for others to run into the same issue, until we understand the cause.

@akien-mga akien-mga merged commit e742354 into godotengine:master Dec 5, 2022
@akien-mga akien-mga deleted the windows-msvc-debug-crt-opt-in branch December 5, 2022 17:10
@Zylann
Copy link
Contributor

Zylann commented Dec 5, 2022

As I suggested here #69294 (comment)
I think you dont get the slowdown anymore because it could have just been shaders compilation (which typically uses all threads). I get that too. After caching, startup is faster. No idea why the language server would be involved in this though, I havent seen it. Overall, it is normal to see a bit of slowdown, since we simply weren't using debug Godot with "release" C++ runtime before, and some thirdparty libs might even have been skipping debug checks.

@Ranoller Ranoller mentioned this pull request Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants