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      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

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.