NEW: Subscribe to Hacking with Swift+ and accelerate your learning! >>

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 Admin

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 NSSpain

SPONSORED Announcing NSSpain 2020: Remote Edition! An online, continuous conference for iOS developers. We’ll start on Thursday and finish on Friday, with talks, activities, and lots of fun for 36 hours, non-stop. Sound good? Join us!

Find out more

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

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

Not logged in

Log in
 

Link copied to your pasteboard.