Skip to content

Conversation

@petrasvestartas
Copy link
Collaborator

@petrasvestartas petrasvestartas commented Mar 19, 2025

Changes:

  • Turn off precompiled header for deployment
  • Remove compas.h unnecessary std headers
  • move back module specific headers to the source files, to decrease precompiled header from 1.6 gb to 0.8 gb.

During development precompiled headers can be turned ON by the following flag in the CMakeLists.txt :

# =====================================================================
# Set this flag to ON for developing to increase build time.
# Set this flag to OFF for publishing for file size reduction.
# =====================================================================
option(ENABLE_PRECOMPILED_HEADERS "Enable precompiled headers for the build" ON)

Built time difference with Windows MSVC for precompiled headers from ~52 sec to ~2 seconds.
Without precompiled headers time stays the same ~52 sec.

File size with precompiled headers:

image

Without precompiled headers overall sum of file size is smaller and split within the individual intermediate .obj files:
image

@petrasvestartas petrasvestartas changed the title FIX compas.h header reduction and CMakeLists flag for PCH. File Size Reduction Mar 19, 2025
@petrasvestartas petrasvestartas changed the title File Size Reduction Compiled File Size Reduction Mar 19, 2025
@tomvanmele tomvanmele merged commit 9e044be into compas-dev:main Mar 19, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants