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

Buildsystem performance: Clean build and null build reports #42048

Closed
akien-mga opened this issue Sep 14, 2020 · 17 comments
Closed

Buildsystem performance: Clean build and null build reports #42048

akien-mga opened this issue Sep 14, 2020 · 17 comments

Comments

@akien-mga
Copy link
Member

akien-mga commented Sep 14, 2020

Preamble: This issue is focused on analyzing and (possibly) improving the performance of Godot's buildsystem configuration with SCons. We're not interested in any other buildsystem in the context of this issue, so unsolicited injunctions to "use <some other trendy build tool>" will be moderated away. The core developers' position hasn't changed in years of discussions, we're most happy with SCons but would like it to be faster - that's the sole focus for this issue.


We've noticed that different contributors have wildly different performance metrics with SCons, which do not seem to scale with the host computer's capabilities. Some users seem to have "null builds" (i.e. incremental build with no change to the source code, when everything has already been built once) of more than 20 s on Linux NVME powerhouses, while others have around 5 s null builds on low-end SSDs.

This thread will be used to gather metrics on null builds and clean builds (i.e. a build from scratch after a new clone or git clean -fxd) from contributors, so we can have a clearer picture. We've asked SCons developers @bdbaddog and @mwichmann to help us audit all this and come with recommendations/fixes to improve the overall performance and quality of our SCons buildsystem implementation.


Please time clean builds and null builds locally, and report the results here.

You can also do a "leaf build", i.e. change something that will have a minor impact on the codebase and will only trigger the rebuild of a single object. I suggest doing that by modifying a docstring in doc/classes/Node.xml, which rebuilds the generated header and editor/editor_help.cpp which includes it.

Here are some recommendations so that we get useful results:

  • Use the latest SCons release available (currently 4.0.1)
  • Use the latest Godot master branch
  • Use all the cores from your CPU, close any application that may use CPU resources while building
  • Configure your CPU governor for maximum performance (e.g. on a laptop, plug it in sector and use "performance" governor)
  • Build with time scons p=<platform> tools=yes target=debug -j<cores> so that we all use similar options
  • For null builds (rebuild with no change), run them at least 3 times to ensure that the timings are consistent
  • If you use caching, try first with caching disabled to have the same baseline as others. But feel free to provide additional results with caching enabled for comparison.

Please provide the following details:

  • OS including version, kernel on Linux
  • CPU, RAM, hard disk, partition type where the build happens, etc. (can be done on Linux with e.g. inxi -DCmSP).
  • Compiler, compiler version
  • Python version used by SCons
@akien-mga
Copy link
Member Author

akien-mga commented Sep 14, 2020

Config:

$ inxi -DCmSP
System:    Host: cauldron Kernel: 5.8.9-desktop-1.mga8 x86_64 bits: 64 Desktop: KDE Plasma 5.19.5 Distro: Mageia 8 mga8 
Memory:    RAM: total: 15.40 GiB used: 2.99 GiB (19.4%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Info: Quad Core model: Intel Core i7-8705G bits: 64 type: MT MCP L2 cache: 8192 KiB 
           Speed: 3859 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 3859 2: 3794 3: 3745 4: 3749 5: 3752 6: 3935 7: 3783 
           8: 3607 
Drives:    Local Storage: total: 953.87 GiB used: 790.04 GiB (82.8%) 
           ID-1: /dev/nvme0n1 vendor: Toshiba model: N/A size: 953.87 GiB 
Partition: ID-1: / size: 58.87 GiB used: 31.35 GiB (53.3%) fs: ext4 dev: /dev/nvme0n1p6 
           ID-2: /home size: 195.92 GiB used: 173.24 GiB (88.4%) fs: ext4 dev: /dev/nvme0n1p7 
           ID-3: swap-1 size: 32.20 GiB used: 117.8 MiB (0.4%) fs: swap dev: /dev/nvme0n1p9
  • Building with time scons p=linuxbsd tools=yes target=debug -j8.
  • SCons 4.0.1 with Python 3.8.5 (both distro packages).
  • GCC 10.2.0.

Clean build

real    8m48,514s
user    62m12,914s
sys     3m22,290s

Null build

real    0m6,457s
user    0m6,348s
sys     0m0,199s

Note: The first null build after the clean build took longer as it seemed to relink libcore:

scons: done reading SConscript files.
scons: Building targets ...
Linking Static Library ==> core/libcore.linuxbsd.tools.64.a
Ranlib Library         ==> core/libcore.linuxbsd.tools.64.a
Linking Program        ==> bin/godot.linuxbsd.tools.64
progress_finish(["progress_finish"], [])
Building compilation database compile_commands.json
scons: done building targets.

real    0m22,050s
user    0m21,078s
sys     0m2,528s

Then subsequent null builds don't relink libcore and perform as listed above.

Leaf build

After clean/null builds, modified doc/classes/Node.xml to force regenerating the classref header included in editor/editor_help.cpp, which builds that one changed object and relinks libeditor and godot.

scons: done reading SConscript files.
scons: Building targets ...
Generating documentation header.
Compiling ==> editor/editor_help.cpp
progress_finish(["progress_finish"], [])
Building compilation database compile_commands.json
Linking Static Library ==> editor/libeditor.linuxbsd.tools.64.a
Ranlib Library         ==> editor/libeditor.linuxbsd.tools.64.a
Linking Program        ==> bin/godot.linuxbsd.tools.64
scons: done building targets.

real    0m27,856s
user    0m26,180s
sys     0m3,138s

@neikeq
Copy link
Contributor

neikeq commented Sep 14, 2020

It would also be interesting to see how fast builds are with the generated ninja files once that's merged.

@HaSa1002
Copy link
Contributor

HaSa1002 commented Sep 14, 2020

Computer Info:

System:		Windows 10 Pro 1903 (18362.1082) x64
Memory:    RAM: total: 31.91 GiB used: 11.59 GiB (36.3%)
           RAM Report: unknown-error: dmidecode was unable to generate data
CPU:       Topology: 8-Core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP L2 cache: 4096 KiB
           Speed: 3593 MHz min/max: N/A Core speeds (MHz): 1: 3593 2: 3593 3: 3593 4: 3593 5: 3593 6: 3593 7: 3593
           8: 3593 9: 3593 10: 3593 11: 3593 12: 3593 13: 3593 14: 3593 15: 3593 16: 3593
"wmic logicaldisk":
Drive:
	Samsung SSD 840 EVO 120GB

"Get-Partition":
Partition:
   DiskPath: \\?\scsi#disk&ven_samsung&prod_ssd_840_evo_120g#7&1f21c384&0&050000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

PartitionNumber  DriveLetter Offset                                           Size Type
---------------  ----------- ------                                           ---- ----
1                D           1048576                                     111.79 GB IFS

Compiler:

MSVC version 14.2

Scons:

4.0.1
Python 3.8.5

Builds:

Measure-Command {scons p=windows tools=yes target=debug -j16 | Out-Default}

Clean Build:

Days              : 0
Hours             : 0
Minutes           : 3
Seconds           : 16
Milliseconds      : 270
Ticks             : 1962709141
TotalDays         : 0,00227165409837963
TotalHours        : 0,0545196983611111
TotalMinutes      : 3,27118190166667
TotalSeconds      : 196,2709141
TotalMilliseconds : 196270,9141

Null Builds:

Null Builds Data

1:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 190
Ticks             : 131905942
TotalDays         : 0,000152668914351852
TotalHours        : 0,00366405394444444
TotalMinutes      : 0,219843236666667
TotalSeconds      : 13,1905942
TotalMilliseconds : 13190,5942

2:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 653
Ticks             : 136536064
TotalDays         : 0,000158027851851852
TotalHours        : 0,00379266844444444
TotalMinutes      : 0,227560106666667
TotalSeconds      : 13,6536064
TotalMilliseconds : 13653,6064

3:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 79
Ticks             : 130796187
TotalDays         : 0,000151384475694444
TotalHours        : 0,00363322741666667
TotalMinutes      : 0,217993645
TotalSeconds      : 13,0796187
TotalMilliseconds : 13079,6187

4:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 352
Ticks             : 133525123
TotalDays         : 0,000154542966435185
TotalHours        : 0,00370903119444444
TotalMinutes      : 0,222541871666667
TotalSeconds      : 13,3525123
TotalMilliseconds : 13352,5123

5:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 12
Milliseconds      : 945
Ticks             : 129454275
TotalDays         : 0,000149831336805556
TotalHours        : 0,00359595208333333
TotalMinutes      : 0,215757125
TotalSeconds      : 12,9454275
TotalMilliseconds : 12945,4275
Ticks: 				132443518,2
TotalDays:			0,000153291
TotalHours:			0,003678987
TotalMinutes:		0,220739197
TotalSeconds:		13,24435182
TotalMilliseconds:	13244,35182

Leaf Builds:

Leaf Builds Data

1:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 20
Milliseconds      : 677
Ticks             : 206775443
TotalDays         : 0,000239323429398148
TotalHours        : 0,00574376230555556
TotalMinutes      : 0,344625738333333
TotalSeconds      : 20,6775443
TotalMilliseconds : 20677,5443

2:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 20
Milliseconds      : 281
Ticks             : 202814547
TotalDays         : 0,000234739059027778
TotalHours        : 0,00563373741666667
TotalMinutes      : 0,338024245
TotalSeconds      : 20,2814547
TotalMilliseconds : 20281,4547

3:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 20
Milliseconds      : 487
Ticks             : 204877117
TotalDays         : 0,000237126292824074
TotalHours        : 0,00569103102777778
TotalMinutes      : 0,341461861666667
TotalSeconds      : 20,4877117
TotalMilliseconds : 20487,7117

4:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 19
Milliseconds      : 955
Ticks             : 199555115
TotalDays         : 0,000230966568287037
TotalHours        : 0,00554319763888889
TotalMinutes      : 0,332591858333333
TotalSeconds      : 19,9555115
TotalMilliseconds : 19955,5115

5:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 21
Milliseconds      : 193
Ticks             : 211930029
TotalDays         : 0,000245289385416667
TotalHours        : 0,00588694525
TotalMinutes      : 0,353216715
TotalSeconds      : 21,1930029
TotalMilliseconds : 21193,0029
Ticks:				205190450,2
TotalDays:			0,000237489
TotalHours:			0,005699735
TotalMinutes:		0,341984084
TotalSeconds:		20,51904502
TotalMilliseconds:	20519,04502

@Faless
Copy link
Collaborator

Faless commented Sep 14, 2020

Config

System:    Host: fales-desktop Kernel: 5.4.0-47-generic x86_64 bits: 64 Desktop: Gnome 3.36.4 
           Distro: Ubuntu 20.04.1 LTS (Focal Fossa) 
Memory:    RAM: total: 31.33 GiB used: 3.61 GiB (11.5%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Topology: Quad Core model: Intel Core i7-7700K bits: 64 type: MT MCP L2 cache: 8192 KiB 
           Speed: 800 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 801 
Drives:    Local Storage: total: 4.81 TiB used: 2.01 TiB (41.7%) 
           ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKNW512G8 size: 476.94 GiB 
           ID-2: /dev/sda vendor: Crucial model: CT275MX300SSD1 size: 256.17 GiB 
           ID-3: /dev/sdb vendor: Seagate model: ST2000DM006-2DM164 size: 1.82 TiB 
           ID-4: /dev/sdc vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
           ID-5: /dev/sdd vendor: Seagate model: ST2000DM006-2DM164 size: 1.82 TiB 
Partition: ID-1: / size: 27.18 GiB used: 21.00 GiB (77.3%) fs: ext4 dev: /dev/sda2 
           ID-2: /home size: 223.65 GiB used: 195.65 GiB (87.5%) fs: ext4 dev: /dev/sda3
  • Building with time scons p=linuxbsd tools=yes target=debug -j8.
  • SCons v4.0.1.c289977f8b34786ab6c334311e232886da7e8df1 (from pip) with Python 3.8.2 (distro package).
  • GCC 9.3.0(-10ubuntu2).

Clean build

real	6m33,477s
user	44m48,709s
sys	2m33,078s

Null builds

first run (@akien-mga ):

Note: The first null build after the clean build took longer as it seemed to relink libcore:

same here

scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 74%] Linking Static Library ==> core/libcore.linuxbsd.tools.64.a
[ 85%] Ranlib Library         ==> core/libcore.linuxbsd.tools.64.a
[ 95%] Linking Program        ==> bin/godot.linuxbsd.tools.64
[ 97%] Building compilation database compile_commands.json
[100%] progress_finish(["progress_finish"], [])
[100%] scons: done building targets.


real	0m23,228s
user	0m21,719s
sys	0m2,443s

second run:

real	0m6,180s
user	0m6,060s
sys	0m0,224s

third run

real	0m6,099s
user	0m5,966s
sys	0m0,212s

fourth run

real	0m6,122s
user	0m5,987s
sys	0m0,231s

Leaf builds

first run:

real	0m29,451s
user	0m26,905s
sys	0m3,008s

second run:

real	0m28,848s
user	0m25,997s
sys	0m3,298s

third run:

real	0m29,314s
user	0m26,496s
sys	0m3,182s

I'll provide timings for my laptop in a separate comment.

@HaSa1002
Copy link
Contributor

HaSa1002 commented Sep 14, 2020

Second test on my system drive, which is a M.2 SSD
Computer Info:

System:		Windows 10 Pro 1903 (18362.1082) x64
Memory:    RAM: total: 31.91 GiB used: 11.59 GiB (36.3%)
           RAM Report: unknown-error: dmidecode was unable to generate data
CPU:       Topology: 8-Core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP L2 cache: 4096 KiB
           Speed: 3593 MHz min/max: N/A Core speeds (MHz): 1: 3593 2: 3593 3: 3593 4: 3593 5: 3593 6: 3593 7: 3593
           8: 3593 9: 3593 10: 3593 11: 3593 12: 3593 13: 3593 14: 3593 15: 3593 16: 3593
Get-Disk:
3      Samsung SS... 931.51 GB GPT

"Get-Partition":
   DiskPath: \\?\scsi#disk&ven_nvme&prod_samsung_ssd_970#7&2663fb72&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

PartitionNumber  DriveLetter Offset                                           Size Type
---------------  ----------- ------                                           ---- ----
1                            1048576                                        529 MB Recovery
2                            555745280                                       99 MB System
3                            659554304                                       16 MB Reserved
4                C           676331520                                   930.88 GB Basic

Compiler:

MSVC version 14.2

Scons:

4.0.1
Python 3.8.5

Builds:

Measure-Command {scons p=windows tools=yes target=debug -j16 | Out-Default}

Clean Build:

Days              : 0
Hours             : 0
Minutes           : 2
Seconds           : 30
Milliseconds      : 249
Ticks             : 1502497629
TotalDays         : 0,00173900188541667
TotalHours        : 0,04173604525
TotalMinutes      : 2,504162715
TotalSeconds      : 150,2497629
TotalMilliseconds : 150249,7629

Null Builds:

Null Builds Data

1:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 14
Milliseconds      : 849
Ticks             : 148490423
TotalDays         : 0,000171863915509259
TotalHours        : 0,00412473397222222
TotalMinutes      : 0,247484038333333
TotalSeconds      : 14,8490423
TotalMilliseconds : 14849,0423

2:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 453
Ticks             : 134539885
TotalDays         : 0,000155717459490741
TotalHours        : 0,00373721902777778
TotalMinutes      : 0,224233141666667
TotalSeconds      : 13,4539885
TotalMilliseconds : 13453,9885

3:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 748
Ticks             : 137489933
TotalDays         : 0,000159131866898148
TotalHours        : 0,00381916480555556
TotalMinutes      : 0,229149888333333
TotalSeconds      : 13,7489933
TotalMilliseconds : 13748,9933

4:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 609
Ticks             : 136095695
TotalDays         : 0,000157518165509259
TotalHours        : 0,00378043597222222
TotalMinutes      : 0,226826158333333
TotalSeconds      : 13,6095695
TotalMilliseconds : 13609,5695

5:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 13
Milliseconds      : 889
Ticks             : 138892520
TotalDays         : 0,000160755231481481
TotalHours        : 0,00385812555555556
TotalMinutes      : 0,231487533333333
TotalSeconds      : 13,889252
TotalMilliseconds : 13889,252
Ticks:				139101691,2
TotalDays:			0,000160997
TotalHours:			0,003863936
TotalMinutes:		0,231836152
TotalSeconds:		13,91016912
TotalMilliseconds:	13910,16912


Leaf Builds:

Leaf Builds Data

1:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 19
Milliseconds      : 470
Ticks             : 194702535
TotalDays         : 0,00022535015625
TotalHours        : 0,00540840375
TotalMinutes      : 0,324504225
TotalSeconds      : 19,4702535
TotalMilliseconds : 19470,2535

2:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 19
Milliseconds      : 365
Ticks             : 193651344
TotalDays         : 0,0002241335
TotalHours        : 0,005379204
TotalMinutes      : 0,32275224
TotalSeconds      : 19,3651344
TotalMilliseconds : 19365,1344

3:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 19
Milliseconds      : 493
Ticks             : 194934095
TotalDays         : 0,000225618165509259
TotalHours        : 0,00541483597222222
TotalMinutes      : 0,324890158333333
TotalSeconds      : 19,4934095
TotalMilliseconds : 19493,4095

4:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 18
Milliseconds      : 988
Ticks             : 189887546
TotalDays         : 0,000219777252314815
TotalHours        : 0,00527465405555556
TotalMinutes      : 0,316479243333333
TotalSeconds      : 18,9887546
TotalMilliseconds : 18988,7546

5:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 19
Milliseconds      : 424
Ticks             : 194246336
TotalDays         : 0,000224822148148148
TotalHours        : 0,00539573155555556
TotalMinutes      : 0,323743893333333
TotalSeconds      : 19,4246336
TotalMilliseconds : 19424,6336
Ticks:				193484371,2
TotalDays:			0,00022394
TotalHours:			0,005374566
TotalMinutes:		0,322473952
TotalSeconds:		19,34843712
TotalMilliseconds:	19348,43712

@Calinou
Copy link
Member

Calinou commented Sep 14, 2020

Configuration

System:    Host: localhost.localdomain Kernel: 5.7.15-100.fc31.x86_64 x86_64 bits: 64 Desktop: KDE Plasma 5.18.5 
           Distro: Fedora release 31 (Thirty One) 
Memory:    RAM: total: 31.32 GiB used: 2.66 GiB (8.5%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Info: Quad Core model: Intel Core i7-6700K bits: 64 type: MT MCP L2 cache: 8192 KiB 
           Speed: 800 MHz min/max: 800/4400 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 
Drives:    Local Storage: total: 1.36 TiB used: 1.05 TiB (76.8%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
           ID-2: /dev/sdb vendor: Samsung model: SSD 850 EVO 1TB size: 931.51 GiB 
Partition: ID-1: / size: 913.79 GiB used: 855.84 GiB (93.7%) fs: ext4 dev: /dev/dm-0 
           ID-2: /boot size: 975.9 MiB used: 226.6 MiB (23.2%) fs: ext4 dev: /dev/sdb2 
           ID-3: swap-1 size: 952.0 MiB used: 1.5 MiB (0.2%) fs: swap dev: /dev/dm-1 
  • Fedora 31, Linux 5.7.15.
  • SCons 4.0.1 from pip with Python 3.8.2 installed via pyenv.
  • GCC 9.3.1, ccache disabled.
  • The Godot repository is on the 1 TB SSD.

Clean build

scons platform=linuxbsd tools=yes target=debug -j8  2217.95s user 142.67s system 729% cpu 5:23.74 total

First null build (relinks libcore)

scons platform=linuxbsd tools=yes target=debug -j8  19.81s user 1.94s system 106% cpu 20.466 total

Second, third and fourth null builds (doesn't relink anything)

scons platform=linuxbsd tools=yes target=debug -j8  6.43s user 0.18s system 100% cpu 6.566 total
scons platform=linuxbsd tools=yes target=debug -j8  6.27s user 0.19s system 100% cpu 6.421 total
scons platform=linuxbsd tools=yes target=debug -j8  6.32s user 0.18s system 100% cpu 6.454 total

Leaf builds (modifying a description in doc/classes/Node.xml)

scons platform=linuxbsd tools=yes target=debug -j8  23.95s user 2.40s system 100% cpu 26.126 total
scons platform=linuxbsd tools=yes target=debug -j8  23.80s user 2.42s system 102% cpu 25.685 total
scons platform=linuxbsd tools=yes target=debug -j8  23.78s user 2.45s system 98% cpu 26.702 total

@HaSa1002
Copy link
Contributor

Third test on my hdd.
Computer Info:

System:		Windows 10 Pro 1903 (18362.1082) x64
Memory:    RAM: total: 31.91 GiB used: 11.59 GiB (36.3%)
           RAM Report: unknown-error: dmidecode was unable to generate data
CPU:       Topology: 8-Core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP L2 cache: 4096 KiB
           Speed: 3593 MHz min/max: N/A Core speeds (MHz): 1: 3593 2: 3593 3: 3593 4: 3593 5: 3593 6: 3593 7: 3593
           8: 3593 9: 3593 10: 3593 11: 3593 12: 3593 13: 3593 14: 3593 15: 3593 16: 3593
Get-Disk:
1      ST2000DM00... 1.82 TB MBR

"Get-Partition":
   DiskPath: \\?\scsi#disk&ven_&prod_st2000dm006-2dm1#7&1f21c384&0&040000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

PartitionNumber  DriveLetter Offset                                        Size Type
---------------  ----------- ------                                        ---- ----
1                F           1048576                                    1.82 TB IFS

Compiler:

MSVC version 14.2

Scons:

4.0.1
Python 3.8.5

Builds:

Measure-Command {scons p=windows tools=yes target=debug -j16 | Out-Default}

Clean Build:

Days              : 0
Hours             : 0
Minutes           : 2
Seconds           : 35
Milliseconds      : 512
Ticks             : 1555123402
TotalDays         : 0,00179991134490741
TotalHours        : 0,0431978722777778
TotalMinutes      : 2,59187233666667
TotalSeconds      : 155,5123402
TotalMilliseconds : 155512,3402

Null Builds:

Null Builds Data

1:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 17
Milliseconds      : 610
Ticks             : 176103847
TotalDays         : 0,000203823896990741
TotalHours        : 0,00489177352777778
TotalMinutes      : 0,293506411666667
TotalSeconds      : 17,6103847
TotalMilliseconds : 17610,3847

2:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 15
Milliseconds      : 637
Ticks             : 156376559
TotalDays         : 0,000180991387731481
TotalHours        : 0,00434379330555556
TotalMinutes      : 0,260627598333333
TotalSeconds      : 15,6376559
TotalMilliseconds : 15637,6559

3:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 15
Milliseconds      : 121
Ticks             : 151219775
TotalDays         : 0,000175022887731481
TotalHours        : 0,00420054930555556
TotalMinutes      : 0,252032958333333
TotalSeconds      : 15,1219775
TotalMilliseconds : 15121,9775

4:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 15
Milliseconds      : 284
Ticks             : 152840884
TotalDays         : 0,000176899171296296
TotalHours        : 0,00424558011111111
TotalMinutes      : 0,254734806666667
TotalSeconds      : 15,2840884
TotalMilliseconds : 15284,0884

5:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 15
Milliseconds      : 503
Ticks             : 155034532
TotalDays         : 0,000179438115740741
TotalHours        : 0,00430651477777778
TotalMinutes      : 0,258390886666667
TotalSeconds      : 15,5034532
TotalMilliseconds : 15503,4532
Ticks:				158315119,4
TotalDays:			0,000183235
TotalHours:			0,004397642
TotalMinutes:		0,263858532
TotalSeconds:		15,83151194
TotalMilliseconds:	15831,51194

Leaf Builds:

Leaf Builds Data

1:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 24
Milliseconds      : 311
Ticks             : 243117831
TotalDays         : 0,000281386378472222
TotalHours        : 0,00675327308333333
TotalMinutes      : 0,405196385
TotalSeconds      : 24,3117831
TotalMilliseconds : 24311,7831

2:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 24
Milliseconds      : 716
Ticks             : 247168214
TotalDays         : 0,000286074321759259
TotalHours        : 0,00686578372222222
TotalMinutes      : 0,411947023333333
TotalSeconds      : 24,7168214
TotalMilliseconds : 24716,8214

3:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 24
Milliseconds      : 274
Ticks             : 242745609
TotalDays         : 0,000280955565972222
TotalHours        : 0,00674293358333333
TotalMinutes      : 0,404576015
TotalSeconds      : 24,2745609
TotalMilliseconds : 24274,5609

4:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 24
Milliseconds      : 639
Ticks             : 246395305
TotalDays         : 0,000285179751157407
TotalHours        : 0,00684431402777778
TotalMinutes      : 0,410658841666667
TotalSeconds      : 24,6395305
TotalMilliseconds : 24639,5305

5:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 24
Milliseconds      : 643
Ticks             : 246434199
TotalDays         : 0,000285224767361111
TotalHours        : 0,00684539441666667
TotalMinutes      : 0,410723665
TotalSeconds      : 24,6434199
TotalMilliseconds : 24643,4199
Ticks:				245172231,6
TotalDays:			0,000283764
TotalHours:			0,00681034
TotalMinutes:		0,408620386
TotalSeconds:		24,51722316
TotalMilliseconds:	24517,22316

@hpvb
Copy link
Member

hpvb commented Sep 14, 2020

Config

$ sudo inxi -DCmSP
System:    Host: minni Kernel: 5.7.9-200.fc32.x86_64 x86_64 bits: 64 Desktop: GNOME 3.36.5 
           Distro: Fedora release 32 (Thirty Two) 
Memory:    RAM: total: 125.83 GiB used: 58.96 GiB (46.9%) 
           Array-1: capacity: 512 GiB slots: 8 EC: None 
           Device-1: DIMM 0 size: 16 GiB speed: 2667 MT/s 
           Device-2: DIMM 1 size: 16 GiB speed: 2667 MT/s 
           Device-3: DIMM 0 size: 16 GiB speed: 2667 MT/s 
           Device-4: DIMM 1 size: 16 GiB speed: 2667 MT/s 
           Device-5: DIMM 0 size: 16 GiB speed: 2667 MT/s 
           Device-6: DIMM 1 size: 16 GiB speed: 2667 MT/s 
           Device-7: DIMM 0 size: 16 GiB speed: 2667 MT/s 
           Device-8: DIMM 1 size: 16 GiB speed: 2667 MT/s 
CPU:       Info: 32-Core (4-Die) model: AMD Ryzen Threadripper 2990WX bits: 64 type: MT MCP MCM L2 cache: 16.0 MiB 
           Speed: 2027 MHz min/max: N/A Core speeds (MHz): 1: 2027 2: 1892 3: 1869 4: 2106 5: 1767 6: 1721 7: 1813 8: 1733 
           9: 2941 10: 2858 11: 1701 12: 2277 13: 1721 14: 1719 15: 2110 16: 1720 17: 2437 18: 1720 19: 1719 20: 1807 21: 1708 
           22: 1707 23: 1740 24: 1736 25: 1722 26: 1717 27: 1723 28: 1720 29: 1716 30: 1719 31: 1718 32: 1719 33: 1927 
           34: 2044 35: 1631 36: 2787 37: 1491 38: 1664 39: 2236 40: 2259 41: 2724 42: 2626 43: 1653 44: 2540 45: 1701 
           46: 1706 47: 1750 48: 1662 49: 2354 50: 1790 51: 1795 52: 1760 53: 1789 54: 1787 55: 1848 56: 1836 57: 1753 
           58: 1744 59: 1801 60: 1733 61: 1795 62: 1798 63: 1816 64: 1800 
Drives:    Local Storage: total: 3.64 TiB used: 1.19 TiB (32.8%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 2TB size: 1.82 TiB 
           ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO Plus 2TB size: 1.82 TiB 
Partition: ID-1: / size: 1.69 TiB used: 1.19 TiB (70.4%) fs: xfs dev: /dev/md126 
           ID-2: /boot size: 1018.7 MiB used: 286.7 MiB (28.1%) fs: xfs dev: /dev/md127 
           ID-3: swap-1 size: 127.87 GiB used: 563.5 MiB (0.4%) fs: swap dev: /dev/md125 

  • Fedora 32
  • Building with time scons p=linuxbsd tools=yes target=debug -j64.
  • SCons v4.0.1.c289977f8b34786ab6c334311e232886da7e8df1 from pip with Python 3.8.5 (distro packages).
  • GCC 10.2.1

Clean Build

time scons p=linuxbsd tools=yes target=debug -j64

real	1m39.459s
user	59m28.576s
sys	6m34.439s

Null build

time scons p=linuxbsd tools=yes target=debug -j64
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 74%] Linking Static Library ==> core/libcore.linuxbsd.tools.64.a
[ 78%] Ranlib Library         ==> core/libcore.linuxbsd.tools.64.a
[ 82%] Linking Program        ==> bin/godot.linuxbsd.tools.64
[ 99%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.

real	0m14.947s
user	0m15.125s
sys	0m1.484s

Null build 2, 3, 4

$ time scons p=linuxbsd tools=yes target=debug -j64
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[100%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.

real	0m7.530s
user	0m7.238s
sys	0m0.303s

$ time scons p=linuxbsd tools=yes target=debug -j64
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 99%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.

real	0m7.400s
user	0m7.087s
sys	0m0.306s

$ time scons p=linuxbsd tools=yes target=debug -j64
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[100%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.

real	0m7.520s
user	0m7.119s
sys	0m0.395s

Leaf build

$ time scons p=linuxbsd tools=yes target=debug -j64
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 51%] Generating documentation header.
[ 79%] Compiling ==> editor/editor_help.cpp
[ 99%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] Linking Static Library ==> editor/libeditor.linuxbsd.tools.64.a
Ranlib Library         ==> editor/libeditor.linuxbsd.tools.64.a
[100%] Linking Program        ==> bin/godot.linuxbsd.tools.64
[100%] scons: done building targets.

real	0m19.711s
user	0m19.412s
sys	0m2.148s

Note: This was all significantly worse with Scons 3.1.1. Null builds were 20+s and subsequent null builds did not improve in speed.

@Leleat
Copy link
Contributor

Leleat commented Sep 15, 2020

Config

$ inxi -DCmSP
System:    Host: linux-nb Kernel: 5.8.8-200.fc32.x86_64 x86_64 bits: 64 Desktop: GNOME 3.36.6 
           Distro: Fedora release 32 (Thirty Two) 
Memory:    RAM: total: 15.38 GiB used: 2.22 GiB (14.4%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Info: 6-Core model: Intel Core i7-10750H bits: 64 type: MT MCP L2 cache: 12.0 MiB 
           Speed: 801 MHz min/max: 800/5000 MHz Core speeds (MHz): 1: 900 2: 900 3: 900 4: 901 5: 900 6: 900 7: 900 8: 900 
           9: 900 10: 900 11: 900 12: 900 
Drives:    Local Storage: total: 476.94 GiB used: 65.54 GiB (13.7%) 
           ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKKW512G8 size: 476.94 GiB 
Partition: ID-1: / size: 68.39 GiB used: 23.23 GiB (34.0%) fs: ext4 dev: /dev/dm-1 
           ID-2: /boot size: 975.9 MiB used: 256.3 MiB (26.3%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-3: /home size: 390.35 GiB used: 42.00 GiB (10.8%) fs: ext4 dev: /dev/dm-3 
           ID-4: swap-1 size: 7.75 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/dm-2 
  • Fedora 32, Kernel 5.8.8-200
  • gcc version 10.2.1
  • SCons 4.0.1
  • Python 3.8.5
$ time scons p=x11 tools=yes target=debug -j12

Clean build

real	4m56,290s
user	49m59,608s
sys	3m2,833s

Null build

First time with relink libcore:

real	0m23,156s
user	0m22,416s
sys	0m2,338s

After that (x3):

real	0m6,702s	0m6,758s	0m6,636s
user	0m6,525s	0m6,600s	0m6,456s
sys	0m0,209s	0m0,213s	0m0,235s

Leaf build

doc/classes/Node.xml edited

real	0m27,348s
user	0m26,285s
sys	0m2,782s

@hpvb
Copy link
Member

hpvb commented Sep 15, 2020

Config

$ sudo inxi -DCmSP
System:    Host: isla Kernel: 5.8.7-200.fc32.x86_64 x86_64 bits: 64 Desktop: GNOME 3.36.6 
           Distro: Fedora release 32 (Thirty Two) 
Memory:    RAM: total: 31.11 GiB used: 21.60 GiB (69.4%) 
           Array-1: capacity: 64 GiB slots: 4 EC: Single-bit ECC 
           Device-1: DIMM B size: 16 GiB speed: 2667 MT/s 
           Device-2: DIMM A size: No Module Installed 
           Device-3: DIMM D size: 16 GiB speed: 2667 MT/s 
           Device-4: DIMM C size: No Module Installed 
CPU:       Info: 8-Core model: Intel Xeon E-2286M bits: 64 type: MT MCP L2 cache: 16.0 MiB 
           Speed: 4492 MHz min/max: 800/5000 MHz Core speeds (MHz): 1: 4492 2: 4682 3: 4709 4: 4657 5: 4438 6: 4687 7: 4635 
           8: 4698 9: 4602 10: 4561 11: 4455 12: 4687 13: 4787 14: 4748 15: 4683 16: 4735 
Drives:    Local Storage: total: 3.73 TiB used: 814.59 GiB (21.3%) 
           ID-1: /dev/nvme0n1 model: KXG50PNV2T04 NVMe KIOXIA 2048GB size: 1.86 TiB 
           ID-2: /dev/nvme1n1 model: KXG50PNV2T04 NVMe KIOXIA 2048GB size: 1.86 TiB 
Partition: ID-1: / size: 1.83 TiB used: 811.11 GiB (43.3%) fs: xfs dev: /dev/dm-1 
           ID-2: /boot size: 1015.9 MiB used: 324.2 MiB (31.9%) fs: xfs dev: /dev/md126 
           ID-3: swap-1 size: 31.98 GiB used: 3.08 GiB (9.6%) fs: swap dev: /dev/dm-2 
  • Building with time scons p=linuxbsd tools=yes target=debug -j16.
  • SCons v4.0.1.c289977f8b34786ab6c334311e232886da7e8df1 (from pip) with Python 3.8.5 (distro packages).
  • GCC 10.2.1.

Clean build

$ time scons p=linuxbsd tools=yes target=debug -j16

real	4m7.077s
user	52m12.462s
sys	3m35.293s

First null build

$ time scons p=linuxbsd tools=yes target=debug -j16
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 74%] Linking Static Library ==> core/libcore.linuxbsd.tools.64.a
[ 79%] Ranlib Library         ==> core/libcore.linuxbsd.tools.64.a
[ 82%] Linking Program        ==> bin/godot.linuxbsd.tools.64
[100%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.

real	0m18.955s
user	0m18.428s
sys	0m1.896s

Null builds 2, 3, 4

$ time scons p=linuxbsd tools=yes target=debug -j16
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 99%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.

real	0m5.958s
user	0m5.852s
sys	0m0.204s

$ time scons p=linuxbsd tools=yes target=debug -j16
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[100%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.

real	0m5.992s
user	0m5.872s
sys	0m0.229s

$ time scons p=linuxbsd tools=yes target=debug -j16
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 99%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.

real	0m5.940s
user	0m5.840s
sys	0m0.199s

Leaf build

$ time scons p=linuxbsd tools=yes target=debug -j16
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 51%] Generating documentation header.
[ 78%] Compiling ==> editor/editor_help.cpp
[ 99%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] Linking Static Library ==> editor/libeditor.linuxbsd.tools.64.a
Ranlib Library         ==> editor/libeditor.linuxbsd.tools.64.a
[100%] Linking Program        ==> bin/godot.linuxbsd.tools.64
[100%] scons: done building targets.

real	0m22.956s
user	0m22.041s
sys	0m2.288s

@bruvzg
Copy link
Member

bruvzg commented Nov 23, 2020

Config:

macOS Big Sur 11.0.1 (20B29)

Hardware Overview:
  Model Name:	Mac Pro
  Model Identifier:	MacPro6,1
  Processor Name:	Quad-Core Intel Xeon E5-1620 v2
  Processor Speed:	3,7 GHz
  Number of Processors:	1
  Total Number of Cores:	4
  L2 Cache (per Core):	256 KB
  L3 Cache:	10 MB
  Hyper-Threading Technology:	Enabled

DIMM1:
  Size:	4 GB
  Type:	DDR3 ECC
  Speed:	1866 MHz

DIMM2:
  Size:	4 GB
  Type:	DDR3 ECC
  Speed:	1866 MHz

DIMM3:
  Size:	4 GB
  Type:	DDR3 ECC
  Speed:	1866 MHz

DIMM4:
  Size:	4 GB
  Type:	DDR3 ECC
  Speed:	1866 MHz

SSD:
  Capacity:	251 GB (251 000 193 024 bytes)
  Model:	APPLE SSD SM0256F
  Physical Interconnect:	PCI
  Link Width:	x4
  Link Speed:	5.0 GT/s

Building with time scons p=osx tools=yes target=debug -j8

Godot: 60fd7bfe42
Scons:

Scons: v4.0.1.c289977f8b34786ab6c334311e232886da7e8df1, 2020-07-17 01:50:03
Python: 3.9.0

clang:

Apple clang version 12.0.0 (clang-1200.0.32.27)
Target: x86_64-apple-darwin20.1.0
Thread model: posix

Clean build:

scons p=osx tools=yes target=debug -j8  3407.27s user 284.52s system 621% cpu 9:54.28 total

Null build 1:

scons: Reading SConscript files ...
Building for macOS 10.12+, platform x86-64.
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
[ 73%] Linking Static Library ==> core/libcore.osx.tools.64.a
[ 82%] Ranlib Library         ==> core/libcore.osx.tools.64.a
[ 89%] Linking Program        ==> bin/godot.osx.tools.64
[100%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.
scons p=osx tools=yes target=debug -j8  21.73s user 3.82s system 108% cpu 23.437 total

Null build 2 (similar times for subsequent runs):

scons: Reading SConscript files ...
Building for macOS 10.12+, platform x86-64.
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
[100%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] scons: done building targets.
scons p=osx tools=yes target=debug -j8  14.27s user 1.63s system 98% cpu 16.115 total

Leaf build:

scons: Reading SConscript files ...
Building for macOS 10.12+, platform x86-64.
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
[ 50%] Generating documentation header.
[ 78%] Compiling ==> editor/editor_help.cpp
[ 99%] progress_finish(["progress_finish"], [])
[100%] Building compilation database compile_commands.json
[100%] Linking Static Library ==> editor/libeditor.osx.tools.64.a
Ranlib Library         ==> editor/libeditor.osx.tools.64.a
[100%] Linking Program        ==> bin/godot.osx.tools.64
[100%] scons: done building targets.
scons p=osx tools=yes target=debug -j8  27.71s user 7.06s system 98% cpu 35.355 total

If it's still relevant (seems like no macOS or clang builds reported before)

@bruvzg
Copy link
Member

bruvzg commented Nov 23, 2020

Same system, MinGW build:

clang:

clang version 10.0.0 (https://github.com/llvm/llvm-project.git d32170dbd5b0d54436537b6b75beaf44324e0c28)
Target: x86_64-w64-windows-gnu
Thread model: posix

Clean build:

scons p=windows use_llvm=yes use_mingw=yes tools=yes target=debug -j8  4215.10s user 264.34s system 574% cpu 12:59.20 total

Null build 1:

scons p=windows use_llvm=yes use_mingw=yes tools=yes target=debug -j8  17.98s user 4.29s system 118% cpu 18.738 total

Null build 2+:

scons p=windows use_llvm=yes use_mingw=yes tools=yes target=debug -j8  13.51s user 1.55s system 98% cpu 15.279 total

Leaf build:

scons p=windows use_llvm=yes use_mingw=yes tools=yes target=debug -j8  24.92s user 5.32s system 103% cpu 29.273 total

@bdbaddog
Copy link

@bruvzg - surprised the first null build built anything. That's generally a sign some dependencies specified wrong somewhere.

@efornara
Copy link
Contributor

efornara commented Mar 1, 2021

Built on debian stable. The Build Server in a docker container, but it shouldn't matter.

gcc (Debian 8.3.0-6) 8.3.0 [distro, too old for godot4]
clang version 7.0.1-8+deb10u2 (tags/RELEASE_701/final) [distro, compiler used]
scons 4.1.0 [installed via pip in a venv]

Build Server:

System:    Host: builder Kernel: 4.19.0-14-amd64 x86_64 bits: 64 Console: N/A 
           Distro: Debian GNU/Linux 10 (buster) 
Memory:    RAM: total: 3.79 GiB used: 487.1 MiB (12.5%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Info: Dual Core model: Intel Celeron 847 bits: 64 type: MCP L2 cache: 2 MiB 
           Speed: 798 MHz min/max: 800/1100 MHz Core speeds (MHz): 1: 798 2: 798 
Drives:    Local Storage: total: 298.09 GiB used: 110.02 GiB (36.9%) 
           ID-1: /dev/sda vendor: Seagate model: ST320LT020-9YG142 size: 298.09 GiB 
Partition: ID-1: / size: 288.53 GiB used: 55.01 GiB (19.1%) fs: ext4 dev: /dev/sda1 
           ID-2: swap-1 size: 3.94 GiB used: N/A (0.0%) fs: swap dev: /dev/sda5 

time scons p=linuxbsd use_llvm=yes tools=yes target=debug -j2

clean:
real    66m40.683s
user    122m18.590s
sys     5m33.845s

null (1st time):
real    2m9.867s
user    1m16.719s
sys     0m15.304s

null (2nd time):
real    0m41.596s
user    0m35.298s
sys     0m3.059s

changing rendering_device_vulkan.cpp (scons):
real    2m8.334s
user    1m27.664s
sys     0m15.835s

changing rendering_device_vulkan.cpp (batch):
real    1m32.412s  (total)
user    0m49.567s
sys     0m12.088s
real    0m12.453s  (compile)
user    0m11.445s
sys     0m0.302s
real    1m18.917s  (link)
user    0m38.035s
sys     0m11.568s

Since someone might not like these numbers, here are some more realistic numbers (not really, I usually do the above).

Laptop:

System:    Host: acer Kernel: 4.19.0-14-amd64 x86_64 bits: 64 Desktop: Openbox 3.6.1 
           Distro: Debian GNU/Linux 10 (buster) 
Memory:    RAM: total: 7.67 GiB used: 618 MiB (7.9%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Info: Dual Core model: Intel Core i3-7130U bits: 64 type: MT MCP L2 cache: 3 MiB 
           Speed: 800 MHz min/max: 400/2700 MHz Core speeds (MHz): 1: 800 2: 801 3: 827 4: 800 
Drives:    Local Storage: total: 223.57 GiB used: 173.34 GiB (77.5%) 
           ID-1: /dev/sda vendor: Kingston model: SA400M8240G size: 223.57 GiB 
Partition: ID-1: / size: 223.57 GiB used: 173.34 GiB (77.5%) fs: btrfs dev: /dev/sda1 

time scons p=linuxbsd use_llvm=yes tools=yes target=debug -j4

clean:
real    13m53.286s
user    51m16.743s
sys     2m19.193s

null (1st time):
real    0m27.701s                                                        
user    0m26.479s                                                              
sys     0m3.727s

null (2nd time):
real    0m10.171s
user    0m9.843s
sys     0m0.412s

changing rendering_device_vulkan.cpp (scons):
real    0m28.383s
user    0m30.342s
sys     0m3.510s

changing rendering_device_vulkan.cpp (batch):
real    0m23.993s  (total)
user    0m21.022s
sys     0m2.932s
real    0m3.201s   (compile)
user    0m3.086s
sys     0m0.097s
real    0m20.716s  (link)
user    0m17.904s
sys     0m2.790s

Batch means using scons with verbose=yes and capturing the output. Something like this:

#! /bin/bash
set -e

time clang++ -o drivers/vulkan/rendering_device_vulkan.linuxbsd.tools.64.llvm.o -c -std=gnu++17 -g3 -pipe -fpie -Wall -Werror=return-type -DDEBUG_ENABLED -DDEBUG_MEMORY_ALLOC -DDISABLE_FORCED_INLINE -DTOUCH_ENABLED -DALSA_ENABLED -DALSAMIDI_ENABLED -DPULSEAUDIO_ENABLED -D_REENTRANT -DJOYDEV_ENABLED -DUDEV_ENABLED -DX11_ENABLED -DUNIX_ENABLED -DVULKAN_ENABLED -DTOOLS_ENABLED -DMINIZIP_ENABLED -DZSTD_STATIC_LINKING_ONLY -DHAVE_MNTENT -Ithirdparty/freetype/include -Ithirdparty/libpng -Ithirdparty/vulkan -Ithirdparty/vulkan/include -Ithirdparty/vulkan/loader -Ithirdparty/zstd -Ithirdparty/zlib -Iplatform/linuxbsd -I. drivers/vulkan/rendering_device_vulkan.cpp
ar rc drivers/libdrivers.linuxbsd.tools.64.llvm.a drivers/unix/dir_access_unix.linuxbsd.tools.64.llvm.o drivers/unix/file_access_unix.linuxbsd.tools.64.llvm.o drivers/unix/ip_unix.linuxbsd.tools.64.llvm.o drivers/unix/net_socket_posix.linuxbsd.tools.64.llvm.o drivers/unix/os_unix.linuxbsd.tools.64.llvm.o drivers/unix/syslog_logger.linuxbsd.tools.64.llvm.o drivers/unix/thread_posix.linuxbsd.tools.64.llvm.o drivers/windows/dir_access_windows.linuxbsd.tools.64.llvm.o drivers/windows/file_access_windows.linuxbsd.tools.64.llvm.o drivers/alsa/asound-so_wrap.linuxbsd.tools.64.llvm.o drivers/alsa/audio_driver_alsa.linuxbsd.tools.64.llvm.o drivers/coreaudio/audio_driver_coreaudio.linuxbsd.tools.64.llvm.o drivers/pulseaudio/pulse-so_wrap.linuxbsd.tools.64.llvm.o drivers/pulseaudio/audio_driver_pulseaudio.linuxbsd.tools.64.llvm.o drivers/alsamidi/midi_driver_alsamidi.linuxbsd.tools.64.llvm.o drivers/coremidi/midi_driver_coremidi.linuxbsd.tools.64.llvm.o drivers/winmidi/midi_driver_winmidi.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/cJSON.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/debug_utils.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/dev_ext_trampoline.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/loader.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/murmurhash.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/phys_dev_ext.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/trampoline.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/unknown_ext_chain.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/wsi.linuxbsd.tools.64.llvm.o thirdparty/vulkan/loader/extension_manual.linuxbsd.tools.64.llvm.o thirdparty/vulkan/vk_mem_alloc.linuxbsd.tools.64.llvm.o drivers/vulkan/rendering_device_vulkan.linuxbsd.tools.64.llvm.o drivers/vulkan/vulkan_context.linuxbsd.tools.64.llvm.o thirdparty/libpng/png.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngerror.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngget.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngmem.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngpread.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngread.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngrio.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngrtran.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngrutil.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngset.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngtrans.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngwio.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngwrite.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngwtran.linuxbsd.tools.64.llvm.o thirdparty/libpng/pngwutil.linuxbsd.tools.64.llvm.o drivers/png/image_loader_png.linuxbsd.tools.64.llvm.o drivers/png/png_driver_common.linuxbsd.tools.64.llvm.o drivers/png/resource_saver_png.linuxbsd.tools.64.llvm.o thirdparty/spirv-reflect/spirv_reflect.linuxbsd.tools.64.llvm.o drivers/register_driver_types.linuxbsd.tools.64.llvm.o
ranlib drivers/libdrivers.linuxbsd.tools.64.llvm.a
time clang++ -o bin/godot.linuxbsd.tools.64.llvm -rdynamic -pipe -no-pie -static-libgcc -static-libstdc++ platform/linuxbsd/godot_linuxbsd.linuxbsd.tools.64.llvm.o platform/linuxbsd/crash_handler_linuxbsd.linuxbsd.tools.64.llvm.o platform/linuxbsd/os_linuxbsd.linuxbsd.tools.64.llvm.o platform/linuxbsd/joypad_linux.linuxbsd.tools.64.llvm.o platform/linuxbsd/context_gl_x11.linuxbsd.tools.64.llvm.o platform/linuxbsd/detect_prime_x11.linuxbsd.tools.64.llvm.o platform/linuxbsd/display_server_x11.linuxbsd.tools.64.llvm.o platform/linuxbsd/vulkan_context_x11.linuxbsd.tools.64.llvm.o platform/linuxbsd/key_mapping_x11.linuxbsd.tools.64.llvm.o platform/linuxbsd/libudev-so_wrap.linuxbsd.tools.64.llvm.o main/libmain.linuxbsd.tools.64.llvm.a modules/libmodules.linuxbsd.tools.64.llvm.a modules/libmodule_xatlas_unwrap.linuxbsd.tools.64.llvm.a modules/libmodule_webxr.linuxbsd.tools.64.llvm.a modules/libmodule_websocket.linuxbsd.tools.64.llvm.a modules/libmodule_webrtc.linuxbsd.tools.64.llvm.a modules/libmodule_webp.linuxbsd.tools.64.llvm.a modules/libmodule_webm.linuxbsd.tools.64.llvm.a modules/libmodule_vorbis.linuxbsd.tools.64.llvm.a modules/libmodule_visual_script.linuxbsd.tools.64.llvm.a modules/libmodule_vhacd.linuxbsd.tools.64.llvm.a modules/libmodule_upnp.linuxbsd.tools.64.llvm.a modules/libmodule_tinyexr.linuxbsd.tools.64.llvm.a modules/libmodule_theora.linuxbsd.tools.64.llvm.a modules/libmodule_tga.linuxbsd.tools.64.llvm.a modules/libmodule_text_server_adv.linuxbsd.tools.64.llvm.a modules/libmodule_svg.linuxbsd.tools.64.llvm.a modules/libmodule_stb_vorbis.linuxbsd.tools.64.llvm.a modules/libmodule_squish.linuxbsd.tools.64.llvm.a modules/libmodule_regex.linuxbsd.tools.64.llvm.a modules/libmodule_pvr.linuxbsd.tools.64.llvm.a modules/libmodule_opus.linuxbsd.tools.64.llvm.a modules/libmodule_opensimplex.linuxbsd.tools.64.llvm.a modules/libmodule_ogg.linuxbsd.tools.64.llvm.a modules/libmodule_mobile_vr.linuxbsd.tools.64.llvm.a modules/libmodule_minimp3.linuxbsd.tools.64.llvm.a modules/libmodule_meshoptimizer.linuxbsd.tools.64.llvm.a modules/libmodule_mbedtls.linuxbsd.tools.64.llvm.a modules/libmodule_lightmapper_rd.linuxbsd.tools.64.llvm.a modules/libmodule_jsonrpc.linuxbsd.tools.64.llvm.a modules/libmodule_jpg.linuxbsd.tools.64.llvm.a modules/libmodule_hdr.linuxbsd.tools.64.llvm.a modules/libmodule_gridmap.linuxbsd.tools.64.llvm.a modules/libmodule_gltf.linuxbsd.tools.64.llvm.a modules/libmodule_glslang.linuxbsd.tools.64.llvm.a modules/libmodule_gdscript.linuxbsd.tools.64.llvm.a modules/libmodule_gdnavigation.linuxbsd.tools.64.llvm.a modules/libmodule_gdnative.linuxbsd.tools.64.llvm.a modules/libmodule_freetype.linuxbsd.tools.64.llvm.a modules/libmodule_fbx.linuxbsd.tools.64.llvm.a modules/libmodule_etc.linuxbsd.tools.64.llvm.a modules/libmodule_enet.linuxbsd.tools.64.llvm.a modules/libmodule_denoise.linuxbsd.tools.64.llvm.a modules/libmodule_dds.linuxbsd.tools.64.llvm.a modules/libmodule_cvtt.linuxbsd.tools.64.llvm.a modules/libmodule_csg.linuxbsd.tools.64.llvm.a modules/libmodule_bmp.linuxbsd.tools.64.llvm.a modules/libmodule_basis_universal.linuxbsd.tools.64.llvm.a platform/libplatform.linuxbsd.tools.64.llvm.a drivers/libdrivers.linuxbsd.tools.64.llvm.a editor/libeditor.linuxbsd.tools.64.llvm.a scene/libscene.linuxbsd.tools.64.llvm.a servers/libservers.linuxbsd.tools.64.llvm.a core/libcore.linuxbsd.tools.64.llvm.a modules/freetype/libfreetype_builtin.linuxbsd.tools.64.llvm.a modules/text_server_adv/libharfbuzz_builtin.linuxbsd.tools.64.llvm.a modules/text_server_adv/libgraphite_builtin.linuxbsd.tools.64.llvm.a modules/text_server_adv/libicu_builtin.linuxbsd.tools.64.llvm.a -lXcursor -lXinerama -lXext -lXrandr -lXrender -lX11 -lXi -lGL -lpthread -ldl -l:libatomic.a

My two cents, probably what everyone already knew: annoyingly slow on old (but still capable) hardware. All right on a not so old low-end machine. When developing, linking time dominates scons time.

@bdbaddog
Copy link

bdbaddog commented Mar 2, 2021

You should also add --debug=time to your scons command line to better understand where SCons is spending time when running these builds.

@efornara
Copy link
Contributor

efornara commented Mar 3, 2021

For me, scons doesn't seem such a big issue for this project at this time. If and when godot switches to using dynamic libraries for its components, and possibly starts using pre-compiled headers, things will be different. Now? Meh. When changing a single cpp file, scons is taking 4s out of 28s. Touch just a header file, and compile+link time is going to trounce any time spent in scons.

Now, for the way I like to work 4s-10s, let alone 2mins, would be too much anyway, but, at this stage, scons is a non-issue, unless switching build system make it easier to solve the above.

@akien-mga
Copy link
Member Author

Closing as this is pretty old now.

We've made good progress over the years, both upstream and in our Godot configuration, to increase the speed of both clean rebuilds and incremental builds.

For extra oomph, consider using Pyston and Mold on Linux, or recent SCons' experimental Ninja support, which is included in Godot's master branch.

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

No branches or pull requests

10 participants