UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Performance improvements and monitoring

Forums > Swift

I've recently converted a C# library to swift and have got it working (and passing a couple of hundred tests). I then used the library in a MacOS application. It works fine and produces the expected outputs, but I'm finding that sometimes it goes very slow and, for some inputs, it's very slow all the time.

I have no doubts it's to do with my lack of SWIFT experience. What I am looking for is some advice or pointers to articles on how I go about narrowing down what is causing the performance issues.

In my windows days, I would have run a performance monitor which would give me statistics like which routes were being called, how many times and how long they take. If Xcode and swift have these facilities, I'm not recognising them.

Any suggestions how I break into performance issue resolution?

Thanks Steve

3      

@twostraws  Site AdminHWS+

Xcode also has built-in profiling tools, in the form of Instruments – you can run your app through this, and try something like the Time Profiler to identify any hotspots.

3      

I think the only time I've seen instruments is when I started it by accident and got a wall of icons. I did do some research after that but didn't find much on the Internet to explain it. I'll have another go, thank you.

3      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.