Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8827141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:18:25+00:00 2026-06-14T07:18:25+00:00

I have a huge project, something about 150 000 LOC of C++ code. Build

  • 0

I have a huge project, something about 150 000 LOC of C++ code. Build time is something about 15 minutes. This project consists of many sub-projects of different sizes.

I have built separate precompiled headers for each subproject, but when I use them build time stays roughly the same. It seemed that build time is 5-10% percent less, not more.

Precompiled headers is definitely used, I use -Winvalid-pch option and I have tried to compile with -H compiler option, my precompiled headers appears in output with ‘bang’ symbol, that means that compiler is able to use precompiled header.

All my precompiled headers is not very large, every file is something about 50Mb.
I use python script, found here to generate list of most used precompiled headers so my list of precompilation candidates is quite good.

Is there any free/open source tools for build optimization? It seemed that standard make utility doesn’t have ability to measure build times of different targets. I can’t find the way to get the statistics for different targets with make. I’m not talking about dependency analysis or something advanced. I just want to know for what targets most of the time was wasted.

Also, it seemed that GCC is quite inefficient in dealing with precompiled headers. I was unable to get any subproject build notably faster, maximum speedup that I get is 20% on a project that gets three minutes to build. It seemed that it is easier and cheaper to buy faster machine with solid state drive than to optimize build time on linux with GCC.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:18:26+00:00Added an answer on June 14, 2026 at 7:18 am

    If you want to get the most out of this feature, you need to understand how your projects can be structured to make good use of them. The best way is the slow, hard process of manually reducing build times. Sounds really stupid at first, but if all builds going forward are 5 times faster and you know how to structure your projects and dependencies moving forward — then you realize the payoff.

    You can setup a continuous integration system with your targets to measure and record your progress/improvements as your changes come in.

    I have a huge project, something about 150 000 LOC of C++ code. Build time is something about 15 minutes. This project consists of many sub-projects of different sizes.

    Sounds like it’s doing a lot of redundant work, assuming you have a modern machine.

    Also consider link times.

    All my precompiled headers is not very large, every file is something about 50Mb.

    That’s pretty big, IMO.

    I’m not talking about dependency analysis or something advanced.

    Again, Continuous Integration for stats. For a build that slow, excessive dependencies are very likely the issue (unless you have many many small cpp files, or something silly like physical memory exhaustion is occurring).

    I was unable to get any subproject build notably faster, maximum speedup that I get is 20%

    Understand your structures and dependencies. PCHs slow down most of my projects.

    It seemed that it is easier and cheaper to buy faster machine with solid state drive than to optimize build time on linux with GCC.

    Chances are, that machine will not make your build times 20x faster, but fixing up your dependencies and project structures can make it 20x faster (or whatever the root of the problem ultimately is). The machine helps only so much (considering the build time for 150KSLOC).

    Your build is probably CPU/memory bound.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on a huge ETL project with 150+ tables and during
I have this huge VB project which i just got from some one. i
I have started working on a new project and the code is huge. Documentation
I have a huge project with over 50 or 60 csproj files. I need
Possible Duplicate: cmake is not working in opencv c++ project I have a huge
Our Django project is getting huge. We have hundreds of apps and use a
Disclaimer: I'm working in a project where exist an huge webapp that have an
I've got a project managed by CMake with multiple libraries that have link time
my company has recently upgraded from VS2005 to VS2010. We have a huge project
So, I got to work on this huge project. And the is this HUGE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.