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

Reducing build time of openscenario_interpreter by utilizing precompiled headers #1370

Merged
merged 12 commits into from
Oct 10, 2024

Conversation

shouth
Copy link
Contributor

@shouth shouth commented Sep 10, 2024

Description

Abstract

This pull request reduces the build time for opendscenario_interpreter by using precompiled headers.

Background

In the current codebase, large header files were being parsed multiple times and cause longer build time. To address this, I used Clang's -ftime-trace to identify the headers that were taking the most time to parse and updated CMakeLists.txt to ensure they are precompiled.

Details

In my environment, the build time of openscenario_interpreter was reduced from 9m 21s to 7m 59s with 12 parallel builds.

References

N/A

Destructive Changes

N/A

Known Limitations

N/A

Copy link

github-actions bot commented Sep 10, 2024

Checklist for reviewers ☑️

All references to "You" in the following text refer to the code reviewer.

  • Is this pull request written in a way that is easy to read from a third-party perspective?
  • Is there sufficient information (background, purpose, specification, algorithm description, list of disruptive changes, and migration guide) in the description of this pull request?
  • If this pull request contains a destructive change, does this pull request contain the migration guide?
  • Labels of this pull request are valid?
  • All unit tests/integration tests are included in this pull request? If you think adding test cases is unnecessary, please describe why and cross out this line.
  • The documentation for this pull request is enough? If you think adding documents for this pull request is unnecessary, please describe why and cross out this line.

@yamacir-kit yamacir-kit self-requested a review September 10, 2024 09:04
@shouth shouth added small feature improvement wait for regression test bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 labels Sep 17, 2024
@yamacir-kit
Copy link
Collaborator

I have confirmed that the openscenario_interpreter build is 3 minutes shorter in GitHub Actions as well.

@shouth
Copy link
Contributor Author

shouth commented Oct 10, 2024

I sorted precompiled header list.

Copy link

sonarcloud bot commented Oct 10, 2024

@yamacir-kit yamacir-kit merged commit 45da608 into master Oct 10, 2024
14 checks passed
@shouth shouth deleted the feature/faster-compilation branch October 24, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 improvement small feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants