-
Notifications
You must be signed in to change notification settings - Fork 426
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
feat: fast build environment variables #12509
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
|
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Datadog ReportBranch report: ✅ 0 Failed, 43 Passed, 460 Skipped, 51.84s Total duration (9m 16.71s time saved) |
7a2eddc
to
72b311c
Compare
Signed-off-by: Juanjo Alvarez <[email protected]>
BenchmarksBenchmark execution time: 2025-02-26 17:26:13 Comparing candidate commit d1cfb07 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 418 metrics, 2 unstable metrics. |
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
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.
awesome, mostly some nits and minor suggestions.
I didn't realize we had docs for the build/package env variables, there are a few I've added which are missing from that 🙈 (_DD_RUST_DEBUG
, _DD_CYTHON_ANNOTATE
, _DD_DEBUG_EXT
... although looking at the other env vars in setup.py
, not sure we need the _
prefix)
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.
oh! another thought, you updates to set DD_FAST_BUILD=1
for build_base_venvs
, do we need to do the same for all hatch
jobs?
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
…ed in another PR Signed-off-by: Juanjo Alvarez <[email protected]>
Do you have documentation on why this is faster? |
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
For cmake's As for "why", not compiling abseil removed around 40% of the compilation time, and for |
hatch updated |
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.
one last little non-blocking nit.
hatch.toml
Outdated
[envs.appsec_iast_packages.env-vars] | ||
CMAKE_BUILD_PARALLEL_LEVEL = "12" | ||
CARGO_BUILD_JOBS = "12" | ||
DD_FAST_BUILD = "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.
should we just set this in the GitLab config?
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.
same for the parallel args?
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Description
Adds
DD_FAST_BUILD
which, if present, should halve the time to build the project (in my machine, 146 seconds without to 69 seconds without sccache) or be 4x faster if previously catched with sccache (44 seconds to 10) by exchanging some optimizations (disable abseil lib in IAST, -O0) for better build time. To be used for development and CI (CI config is also modified to use this env var, except for themain
branch to catch corner cases that could happen only when optimized).Adds
DD_COMPILE_ABSEIL
which, is present and "0" will disable the compilation of abseil in the native module independently of the release mode (currently is compiled by default if inRelease
mode only; this behavior will continue ifDD_COMPILE_ABSEIL
is not present).Add a new "build" section in
docs/configuration.rst
with these two environment vars plus two that were notdocumented.
Fix an error in the documentation of
DD_COMPILE_DEBUG
(it enablesDebug
mode, notRelWithDebInfo
as stated, and does it for all native extensions not only pyx ones). I will add an option to compile withRelWithDebInfo
in a further PR.Signed-off-by: Juanjo Alvarez [email protected]## Checklist
Reviewer Checklist