-
Notifications
You must be signed in to change notification settings - Fork 200
Speed up recompilation when changing compile-time config #4850
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
Conversation
b9a29d2
to
faaa6bc
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4850 +/- ##
=======================================
Coverage 86.55% 86.55%
=======================================
Files 1397 1397
Lines 60489 60515 +26
Branches 7452 7453 +1
=======================================
+ Hits 52355 52380 +25
Misses 7966 7966
- Partials 168 169 +1 ☔ View full report in Codecov by Sentry. |
97d7645
to
060a86a
Compare
060a86a
to
e414205
Compare
- name: Test with coverage vector capacity of 2 | ||
run: | | ||
make lcov VECTOR_CAPACITY_LOG2=1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realised that this doesn't work since recompiling overwrites the coverage data from previous runs. If we want to include it we'll need to find a way to merge the coverage data from multiple runs from different builds.
Benchmark ResultMaster commit hash:
|
@@ -131,6 +131,7 @@ fn build_bundled_cmake() -> Result<Vec<PathBuf>, Box<dyn std::error::Error>> { | |||
Ok(vec![ | |||
kuzu_root.join("src/include"), | |||
build_dir.join("build/src"), | |||
build_dir.join("build/src/include"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benjaminwinger can you take a look at the rust build changes here to see if they make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@benjaminwinger can I delegate the review of this PR to you? I don't think I need to be involved here. |
@@ -131,6 +131,7 @@ fn build_bundled_cmake() -> Result<Vec<PathBuf>, Box<dyn std::error::Error>> { | |||
Ok(vec![ | |||
kuzu_root.join("src/include"), | |||
build_dir.join("build/src"), | |||
build_dir.join("build/src/include"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Description
Added a template file
cmake/templates/system_config.h.in
that uses CMake'sconfigure_file
that is used to generate the header${CMAKE_BINARY_DIR}/src/include/common/system_config.h
which contains all of our compile-time configurations. Also added${CMAKE_BINARY_DIR}/src/include
as an include directory so that we can include the generated header ascommon/system_config.h
This means that when we recompile with a different configuration, only files that include the generated
system_config.h
will be recompiled (with the existing method of using compile definitions the whole project will be recompiled each time a configuration is changed).Speedup
Master
New
With the current changes I got the number of recompile steps reduced to 569 from 777
I've gotten the speedup to improve to about 220 steps by making changes to the code (e.g. reorganizing includes, moving stuff from header to cpp file) but I'll put that in a separate PR since it's a large change.
Contributor agreement