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

Integrate ctcache to improve build time in industrial_ci #887

Open
ipa-rar opened this issue Oct 7, 2024 · 0 comments
Open

Integrate ctcache to improve build time in industrial_ci #887

ipa-rar opened this issue Oct 7, 2024 · 0 comments

Comments

@ipa-rar
Copy link

ipa-rar commented Oct 7, 2024

Context
When using clang-tidy as part of the ROS build pipeline, the analysis phase can be quite time-consuming, especially for large C++ packages. Re-running clang-tidy on previously analyzed code can lead to unnecessary overhead and delays. ctcache addresses this by caching results and reusing them for unchanged files.

In our use case, integrating ctcache locally has resulted in a notable reduction in build time by avoiding redundant static analysis operations. This improvement would be beneficial for many users who run industrial_ci in CI environments where build speed is critical.

ctcache workflow

                +-------------------------------+
                |  Start                        |
                +-------------------------------+
                                |
                                v
                +-------------------------------+
                | Parse Command-Line Arguments  |
                +-------------------------------+
                                |
                                v
                +-------------------------------+
                | Generate Hash (Digest)        |
                +-------------------------------+
                                |
                                v
       +------------------[ Yes ]---------------+
       |    Is hash in cache?                   |
       +------------------[ No ]----------------+
        |                                          |
        v                                          v
+---------------------------+           +---------------------------+
| Fetch Cached Result        |           | Run clang-tidy            |
+---------------------------+           +---------------------------+
        |                                          |
        v                                          v
+---------------------------+           +---------------------------+
| Return Cached Output       |           | Save Result in Cache      |
+---------------------------+           +---------------------------+
                                                 |
                                                 v
                                      +---------------------------+
                                      | Return clang-tidy Output   |
                                      +---------------------------+

Feature Request
I'd like to suggest adding support for ctcache to industrial_ci. ctcache significantly improves build times by caching static analysis results from clang-tidy, avoiding repeated analysis of unchanged files.

Discussion
I believe this feature could greatly enhance the efficiency of the industrial_ci pipeline. I would like to hear from the maintainers and the community—would this be a useful addition for others as well? Are there any potential challenges or concerns with adding ctcache support to industrial_ci?

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

No branches or pull requests

1 participant