Open
Description
Doing some profiling to determine why incremental Cargo builds are slow, I noticed that hard-linking the incremental files takes a nontrivial amount of time. This issue is to ask those in-the-know if it may be possible to improve it.
On my system (macos, apfs, an extremely fast ssd), it takes between 500 to 750ms of a 7s incremental build (7% to 10%) just to hard-link the incremental files. The incremental build of cargo's lib generates about 1000 files, and it appears the incremental system links them 3 times (once from incremental
to working
, then working
to deps
, and then deps
back to incremental
), for a total of about 3,000 hard links.
I see two things here:
- Can incremental produce fewer files?
- Can incremental not hard-link the same files 3 times?