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

[WIP] MSVC Build Time Improvement - please test #41288

Closed

Conversation

RevoluPowered
Copy link
Contributor

I am opening this so we can start testing some MSVC fixes, it's not perfect or ready to be reviewed but it does improve the situation a lot for me on my system.

#41271 (comment)

@ghost
Copy link

ghost commented Aug 15, 2020

/MT 16? is that for like, 16 threads?
or is it a number i can't make sense of? what happens if someone doesn't have 16 threads? what if they have more?

isn't having a fixed value kinda bad?

i have a bat file which sets up the visual studio project to use multiple threads when compiling anyway
(but the build messages are still from scons though, so like, i'm not using microsoft's compiler, or am i? i'm always confused about it)
scons --silent --jobs 16 platform=windows target=debug bits=64 vsproj=yes

edit: i think i just didn't understand scons true purpose, i always thought it was a compiler, but i guess it was just a thing ment to setup stuff up? or it does compilation related stuff too? i dunno... it's confusing, i don't really understand it, i'm a bit ignorant on the topic, i just try to get stuff to work as fast as i can mostly xD

@RevoluPowered
Copy link
Contributor Author

/MT 16? is that for like, 16 threads?
or is it a number i can't make sense of? what happens if someone doesn't have 16 threads? what if they have more?

isn't having a fixed value kinda bad?

i have a bat file which sets up the visual studio project to use multiple threads when compiling anyway
(but the build messages are still from scons though, so like, i'm not using microsoft's compiler, or am i? i'm always confused about it)
scons --silent --jobs 16 platform=windows target=debug bits=64 vsproj=yes

edit: i think i just didn't understand scons true purpose, i always thought it was a compiler, but i guess it was just a thing ment to setup stuff up? or it does compilation related stuff too? i dunno... it's confusing, i don't really understand it, i'm a bit ignorant on the topic, i just try to get stuff to work as fast as i can mostly xD

This is mostly an experiment, if it has any fruitful gains we will implement it properly, if not then it's not wasted time.

@Xrayez
Copy link
Contributor

Xrayez commented Aug 16, 2020

PS D:\src\godot\4> scons tests=yes
scons: Reading SConscript files ...
Automatically detected platform: windows
Configuring for Windows: target=debug, bits=default
Found MSVC version 14.2, arch amd64, bits=64
...
> LINK : warning LNK4044: unrecognized option '/MT16'; ignored

Does it require newest MSVC version?

@RevoluPowered
Copy link
Contributor Author

RevoluPowered commented Aug 16, 2020

PS D:\src\godot\4> scons tests=yes
scons: Reading SConscript files ...
Automatically detected platform: windows
Configuring for Windows: target=debug, bits=default
Found MSVC version 14.2, arch amd64, bits=64
...
> LINK : warning LNK4044: unrecognized option '/MT16'; ignored

Does it require newest MSVC version?

nah i just messed that flag up so apparently /MD can take optional arguments, but it doesn't work in any msvc version i tried, so for now it's safe to ignore

@Xrayez
Copy link
Contributor

Xrayez commented Aug 16, 2020

I haven't noticed any improvement. 😮

Full rebuild (with scons --clean):

command took 0:11:12.12 (672.12s total)  # without this PR
command took 0:11:36.73 (696.73s total)  # with this PR

Rebuilding single file on change (core/image.cpp) takes 37 seconds on average on my machine (Core i7 4790k), --jobs 6.

SCons 3.1.1.

@RevoluPowered
Copy link
Contributor Author

I haven't noticed any improvement. 😮

Full rebuild (with scons --clean):

command took 0:11:12.12 (672.12s total)  # without this PR
command took 0:11:36.73 (696.73s total)  # with this PR

Rebuilding single file on change (core/image.cpp) takes 37 seconds on average on my machine (Core i7 4790k), --jobs 6.

SCons 3.1.1.

I guess it's entirely possible the fix only applies to AMD CPU's. I can run some new tests next week and determine if its a CPU specific optimization, but yeah the times you are seeing are the ones I would expect to see on windows. 30~ is the normal average for each platform.

Before linking was extremel slow on AMD, like large delays, we also have a hang in scons when target=release_debug at 'preparing build' before any compiler commands are registered.

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.

4 participants