Application is almost frozen while recording in Leaks instrument

I have an application which is almost 1.5GB.

While detecting leaks though leaks instrument, I can't check.

Because my application is frozen during recording and if I tap on a button in my application during that time, it takes around 5 minutes to execute.

After a while app is totally frozen and I can't detect leak.

Need your valuable feedback to resolve this issue.

How to detect leak easily in my application through Leaks instrument tool?

Hi there,

thank you for your question!

There are a few factors at play here.

First of all, we made some significant performance improvements in Leaks detection in macOS Ventura and iOS 16. Can you please try to reproduce this when running your application on one of these operating systems and then profiling it with Instruments? You will likely have to install Xcode 14 as well to be able target these operating systems.

If the issue still persists: I'm assuming you chose the "Leaks" template from the Instruments template chooser when you created a new document. In this case, two instruments are added to you document, the Leaks instrument and the Allocations instrument. In this template, the Allocations instrument is configured to "record reference counts", to help in debugging a potential leak (You can check in the Recording Options, from "File -> Recording Options"). However, recording all allocations and all retain/release calls is very expensive and might explain the issues you are seeing. To see whether this is the cause of the problem, simply delete the Allocations instrument from your document (select it and then choose "Document -> Remove 'Allocations' Instrument"), then record again.

If you are recording with only the Leaks instrument, and still see issues: The way the Leaks instrument works is that it regularly pauses the process (by default every 10s). This usually takes a few seconds. So some unresponsiveness in the application every few seconds for a few seconds is expected.

However, it definitely should not take 5 minutes to become responsive again. If this still happens for you when running your app on macOS Ventura/iOS 16 with only the Leaks instrument, please file a feedback.

Application is almost frozen while recording in Leaks instrument
 
 
Q