After seeing videos about the speed of -fincremental
, i decided to give it a try but I could not manage any improvement on my side. Could it be because my project contains C libraries?
Just to be sure, I cloned the zig-webui repo to build its examples using -fincremental
:
> zig build examples -fincremental --summary all
Build Summary: 24/24 steps succeeded
examples cached
├─ install call_js_from_zig cached
│ └─ zig build-exe call_js_from_zig Debug native success 32s MaxRSS:172M
│ ├─ WriteFile webui.h cached
│ ├─ zig build-lib webui Debug native success 441ms MaxRSS:24M
│ ├─ zig build-lib webui Debug native (reused)
│ ├─ WriteFile webui.h (reused)
│ ├─ zig build-lib webui Debug native (reused)
│ ├─ zig build-lib webui Debug native (reused)
│ └─ options cached
├─ install call_zig_from_js cached
│ └─ zig build-exe call_zig_from_js Debug native success 32s MaxRSS:176M
│ ├─ WriteFile webui.h (reused)
...
Running the cmd zig build examples -fincremental
a few times (without modifying any of the .zig files) did not improve the compilation time, which stays around 30 sec.
I was thinking that I would see a lot more cached
instead of success
, and I wondered if this is due to the step:
...
│ ├─ zig build-lib webui Debug native success 441ms MaxRSS:24M
...
which is, I believe, about the webui C library.
Am I missing something about the use of -fincremental
? I am testing on a Windows OS btw.