NEW: Start my new Ultimate Portfolio App course with a free Hacking with Swift+ trial! >>

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


@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.


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.


Hacking with Swift is sponsored by Essential Developer

SPONSORED From January 26th to 31st you can join a FREE crash course for iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a senior developer!

Save your spot now

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.