Install -C is now my compile bottleneck

Ahahahahah ahah

But seriously, by a considerable margin.

So I have this dvui app that now compile instantaneously in incremental mode on zig master. But it is 260 Mo-ish and install -C .zig-cache/... takes 1.3 seconds on my laptop.

And yes, it feels very wrong :wink:

But if I try to run the install command without the -C flag, it takes only 0.2 [s] (same with cp)

So I’m gonna guess that the comparison of files introduced with -C, or the reading of destination, or likely both is responsible for the extra duration.

Is anybody familiar with that stuff from zig’s perspective ?

PS : I can obviously tweak the build script to not copy the file but this seems a bit hackish…

Ah, but wait. I had the feeling of this being new. I just manage to test on 0.17.0-dev.864+3deb86baf and the exact same source code doesn’t show this behavior.

i.e. install -C .zig-cache/.... is very fast.

So something changed in latest zig but I don’t get how this could influence the execution speed of install command …

Ok, sorry for the split message.

I know why it’s slower, the -fincremental results with a binary of 2.2G instead of 229M on 0.17.0-dev.1099+7db2ef610

a) I should have noticed this earlier, in which case I would have wait a couple of days to see if it’s a temporary regression

b) Since I already posted, is anybody aware of it ?