At a previous job where we had very slow build times (like way slower than you even expect Swift code to build :), we found that excluding certain files from AV scanning substantially reduced build times. Unfortunately I wasn't part of the process with IT so I don't know which files were excluded.
Now at my new company we've installed the same AV solution, Sophos. Since we've done that it appears my compile times have increased, but I didn't benchmark so I don't know by how much. I have noticed that building a small IPA takes 10 minutes on my top of the line 2017 MBP, and that definitely seems way slower (spends forever generating bitcode). So it's on me to figure out what files to exclude that will help restore my compile times, without introducing a dangerous vector onto my machine. So I'm lookin for advice from anyone who has thought about or done this.
First, I believe that all of the writing XCode does when building/compiling is within the DerivedData directory, so that's the obvious target to exclude from AV scanning. But am I right, is there any other directories where a lot of writing occurs during builds that I should consider?
Secondly, I believe that DerivedData is safe to exclude, because it's built from source, and both the source and XCode (and it's tools) will be AV scanned. So even if by unlikely chance a virus was able to get onto my Mac and infect the DerivedData folder without being detected anywhere else, the build products in DerivedData are frequently updated from new builds which should overwrite and replace any infected files every new build, so there should be almost no risk. But am I being cavalier about the risk of a built product getting infected and distributed before it's replaced by a new build?
Lastly, any other advice about solving this problem is appreciated.
thanks,
*****