Search code examples
xcodemacosxcode11macos-catalina

Xcode 11.5, excessive network usage


From time to time I work in my parent's house; because the internet sucks I had to buy capped internet from the mobile company, so I installed Bandwith+ to check my data usage.

I do iOS development mostly as a hobby, so I have Xcode sitting open while I work my real job. Today I was horrified when my internet usage reached 20GB by the afternoon, most days I average 2GB the whole day

I blamed Paralells and Windows update at first but since nothing I did seemed to stop the excessive network usage I checked the Activity monitor and found the culprit

Xcode has been sitting open 10 minutes after reload, no simulator open, just the project I'm working on (which has no network usage whatsoever), no additions to the project, just staying in the background while I'm typing this and waiting for the clock to run out

enter image description here

Funny enough it was sitting happy at 28KB received for around 7 minutes until it went crazy

But let's give him another 10 minutes and see where it reaches, remember, it's just sitting in the background, I'm grabbing a drink meanwhile...

enter image description here

It consumed almost a GB in 20 minutes! What is it even downloading?

More information: I downloaded it from the App Store yesterday, actually deleted the old Application before installing it again to see if it solved a Playgrounds bug I've been having (it didn't)

I'll probably redownload it tomorrow, but I want to know if there is something I might be missing or are there some workarounds


Solution

  • Ok, I'll tell what happened

    A few days after the bandwidth problem I started getting this issue (I don't use flutter) https://github.com/flutter/flutter/issues/56826

    My trash can was filling with dyld_shared_cache_arm64 files from Xcode

    I noticed Xcode was reporting "Copying cache files from device" the whole time I was using it, so I searched for a solution

    I have an iPad that I connect wirelessly for convenience, that was the source of the downloads, I disabled the wireless debugging and now the bandwidth issue is over, it does try to copy the cache files every time I try to run an app via USB cable and it seems to never end. I just cancel that run and it works fine the second time