Decreasing build time

Technical Note 48554






2015-11-06 13:05


For large projects, long build times can be a problem.

Solution hints

  1. For shared components versions 8.x.x and older: check if enabling Parallel Build (Tools > Options > Project > Enable parallel build) helps. You can find the version of shared components in Help > About. (For shared components 9.x.x and newer, parallel building is enabled automatically and then using this option typically does not lead to any improvement.)
  2. Make sure to use guard conditions in ALL header files. That is...
    #ifndef HFILE_H
    #define HFILE_H
    /* ... */
    .. and also check if it is possible to reduce the number of #includes in some of the source files. This could have great impact on build speed.

    To see the size of each C-file with header files included, enable: Options > C/C++ Compiler > Preprocessor > "Preprocessor output to file". Then check the generated .i-file. Is it large?

  3. Create pre-built libraries of "support"-code (BSPs, stacks etc) that does not have to be re-built with every modification of the application code.

  4. Disable the generation of compiler list files (Options > C/C++ Compiler > List).

  5. If some source files are located on a network drive (even if it is a RAM disk on the server), try copying the files to a "local" drive, and build there. If it goes faster, there might be a network filesystem (NFS/Samba) problem.

  6. If step 5 above helped (use a local drive), it may help to only place Object files and List files on a local drive. Modify Project > Options > General Options > Output. Configure "Object files" and "List files" to be placed locally.

  7. (General hints): See technical note 40547.

All product names are trademarks or registered trademarks of their respective owners.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.