swift-frontend memory usage

I think I've found a memory leak with GeometryReader. The memory footprint of swift-frontend grows 50gb> with this single line

I have detailed the issue here: https://github.com/Func-Main/swiftui-memory-bug

Is anyone able to confirm? I don't think this is an issue related to the purely to the .aspectRatio modifier, but rather GeometryReader in general.

This image was after 30 seconds

Can confirm that Xcode 13.2 RC appears to have fixed this bug.

Working on XCode 13.1, Monterey - confirming saw the issue where SourceKitService & swift-frontend memory usage would each explode to around 40GB. 

I saw this issue fairly quickly - within minutes - of using GeometryReader in a project. After going through above thread, I decide to remove the code using GeometryReader, force quit above services, closed and re-opened XCode. 

So far, I do not see any spike in memory in the above services. SourceKitService is at about 70MB, XCode at about 1.11 GB. Launched app on device and, so far, XCode & system are stable with above usage. 

Would love to know what the issue is here

Unfortunately, the issue is still present within XCode 13.2 RC in 1 of my complex iOS projects. I'll reopen the issue report to Apple.

The issue is still present in XCode 13.2 Final Release. This is a show stopper! Apple Devs, please soon fix the issue. Xcode is useless since 2 months.

My project does not build anymore, neither with simulator or real device. Analysing the project does not work neither. Automatically running background tasks e.g. for Canvas prevent from continued software development (without user triggered build functionality). RAM memory consumption grows up to 100 GB and more. Included Swift packages compile correctly, but compilation of own modules lasts for ever in dead loop without compilation warning. There's some long lasting background build activity, if patient, the build process may finish (before the MBP resets). This behaviour is non deterministic: I've experienced the same project may compile/run after a build folder clean without any code change. I was somehow lucky to first progress with XCode 13.2 RC (13C90), but the local workaround does not work anymore. Please help out.

Build succeeded 17/12/2021 19:19 1731.0 seconds !!

Had this issue too, couldn't work at all. Updated to Xcode 13.2.1 (13C100) version. Now everything works as a clock!

I had Xcode 13.2.1 (13C100) and the issue remains. im running a MacBookPro15,1 with bigsur

I'm also having the exact same issue, it shows 50 GB memory usage and asks me to force quit apps to freeup memory. Very strange.

This is absolutely ridiculous, this should be a top priority at Apple. I am running 13.2 and ran into this now. After the restart Xcode pushes my Macbook Pro 2020 16GB to above 100c temps and gets stuck on building. How is this still an issue after so many months?? Now I am forced to downgrade to 12.5.1. Some devs are under a lot of deadline pressure, this is unacceptable for a company such as Apple that prides itself in its developer tools.

My M1 Max laptop with 64GB almost exploded today because of this thing... Look at these numbers :)

On a MacBook Air M1 (2020) 16GB with macOS 12.4 and XCode 13.4.1 (13F100) having the same issue - while developping a SwiftUI XCode is reporting an internal error and gets stuck... crashing the whole system. Swift Frontend going up until 100 GB (sic!). Should I downgrade XCode ? To what version? - Edit: After restart "Clean Build Folder" works. Then without any action after a few seconds the SourceKitService comes to live and starts eating Memory from 19 GB up till 110 GB and then disapears (crashes?). What the heck is going on here?

50 GB ???? *

My M1 Max with 64 Gb RAM just crashed because of this. Xcode 14 release, not beta, MacOS 12.6, latest update. Trying to compile this a SwiftUI view with a Table in it.

swift-frontend memory usage
 
 
Q