Commit 5bbad46
authored
Improve check build performance (#299)
- Enable parallel execution
- Set examples to run serially. Since they perform the same queries, it
results in faster builds when API cache is enabled, as the first example
can store cache for the next ones. When running examples, should decide
whether to run parallel based on whether API cache is enabled.
Intentionally not reading whether cache is enabled to keep it explicit.
- Lower KotlinCompileDaemon heap for `build-logic`. This build uses a
separate daemon because the embedded Kotlin for Gradle Kotlin DSL is
1.9.22, while the main build's is 2.0.20.
- Also set toolchain for `build-logic`
### Difference in KotlinCompileDaemon args
Comparison of both builds daemon args, logged when `--info`
<img width="794" alt="Screenshot 2024-09-09 at 11 18 59"
src="https://github.com/user-attachments/assets/cba0ebd5-8936-4d19-bd80-e30a195d2313">
### Check builds
- build with `-PparallelExamples=true`:
https://scans.gradle.com/s/ss2whvbc4uhdo
- build with `-PparallelExamples=false` (default):
https://scans.gradle.com/s/hl35ecmhfppse
#### Benchmarks
##### Before lowering KCD heap
<img width="1333" alt="Screenshot 2024-09-09 at 11 53 17"
src="https://github.com/user-attachments/assets/7cb4b066-8dd9-4da0-9d71-aec2c873ef29">
##### After lowering KCD heap
<img width="1313" alt="Screenshot 2024-09-09 at 11 54 33"
src="https://github.com/user-attachments/assets/884cb52a-19e9-4b3f-8ea1-1e9a7a4729c1">1 parent a6b6141 commit 5bbad46
File tree
5 files changed
+20
-0
lines changed- build-logic
- examples
5 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
67 | 74 | | |
68 | 75 | | |
69 | 76 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
0 commit comments