Why isn't "swift build --enable-prefetching" the default?

Just started looking at what is parallelized by SPM and the first thing I found was that cloning of dependencies is sequential - but it turned out that since Swift 4 there is an option "-enable-prefetching" which will parallelise it. A small test project went on my M1 Max laptop from 11s to 3s build time from scratch, so definitely made a difference.

So how come this flag isn't the default, why wouldn't you want this?

Are there any way to tweak default flags desired somewhere otherwise? (looking for e.g. environment variables with default options) - looking at the doc right now but can't find it so far.

7 Likes

Hmmm, seems it may just have been my misunderstanding where SPM keeps cached package etc, seems this is actually the default now as far as I can tell, so sorry for any noise - just putting this comment here for future readers.