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

Overhaul build system to reduce memory usage and speed up builds #1105

Closed
lifflander opened this issue Oct 9, 2020 · 4 comments · Fixed by #1106
Closed

Overhaul build system to reduce memory usage and speed up builds #1105

lifflander opened this issue Oct 9, 2020 · 4 comments · Fixed by #1106
Assignees

Comments

@lifflander
Copy link
Collaborator

What Needs to be Done?

With cmake 3.16 released, we have a whole host of new methods for reducing compile times. This will include:

  • Switching to the gold linker instead of ld for CI builds (at least) since it is known to be faster and less resource intensive
  • Explore/implement pre-compiled headers now supported CMake
  • Explore/implement unity builds to reduce compile times and memory usage
@lifflander lifflander self-assigned this Oct 9, 2020
@lifflander
Copy link
Collaborator Author

The baseline time with the gold linker, full build, on my Mac with gcc-7 (code coverage enabled) with 8 cores dedicated to the docker container is. Size is 25 GiB.

baseline, gold, full build:
real    19m41.686s
user    117m0.984s
sys     22m27.988s

@lifflander
Copy link
Collaborator Author

With a Unity build enabled on just VT (libvt):

real    15m42.910s
user    67m12.630s
sys     9m53.687s

@lifflander
Copy link
Collaborator Author

Working on unity build for tests, which I think will have a huge benefit, but it's a pain in the ass.

@lifflander
Copy link
Collaborator Author

lifflander commented Oct 9, 2020

With the full unity build (and lots of changes to go along with them), down to:

real    13m44.297s
user    54m17.289s
sys     8m39.568s

And 18 GiB vs. 25 GiB

lifflander added a commit that referenced this issue Oct 9, 2020
lifflander added a commit that referenced this issue Oct 9, 2020
lifflander added a commit that referenced this issue Oct 10, 2020
lifflander added a commit that referenced this issue Oct 10, 2020
bradybray pushed a commit that referenced this issue Oct 15, 2020
bradybray pushed a commit that referenced this issue Oct 15, 2020
bradybray pushed a commit that referenced this issue Oct 15, 2020
bradybray pushed a commit that referenced this issue Oct 15, 2020
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.

1 participant