Recorded – watch the full episode on YouTube.
If you were to give one piece of advice to help improve performance, what would it be? What's the key performance tip to take away?
Janina Kutyn: This is not as concrete as I think would be helpful, but I think it's just important to think about all the operations that are happening in your code. Did you write code that will cause a lot of rounding of corners and transparencies that need to be composited over each other? Is that what your code is doing? Did you write code that's causing a lot of layout passes?
I think, even if you're not going to optimize your code, it is good to be aware of where something can go wrong in your code. So if you're seeing issues, you know where to go to optimize later when you are running into them.
I don't know if that was a very helpful tip. “Just think about performance, why don't you?”
“I think, even if you're not going to optimize your code, it is good to be aware of where something can go wrong in your code. So if you're seeing issues, you know where to go to optimize later when you are running into them.”
Paul Hudson: It is hard because we all have such different use cases. This is why you're saying, “think about where your code might go wrong." But it could be anywhere when you think about the full spectrum of applications out there. It’s challenging. And this is why so many projects out there have this Not Invented Here syndrome. We don't want to pull in dependencies. We want to do it ourselves in our own code using our solution to it even though something like SDWebImage, for example, has thousands of lines of code to handle all sorts of corner cases and known bugs and so on, that our solution would also have, we still feel better about pulling in nothing and writing it ourselves because we kind of control it. We know what's going on there.
And that's where performance becomes very hard to predict because you've written your own library for doing this and this and this and this. It could be anywhere in this constellation of code you've written. So it is challenging.
This transcript was recorded as part of Swiftly Speaking. You can watch the full original episode on YouTube, or subscribe to the audio version on Apple Podcasts.
SPONSORED From March 20th to 26th, you can join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer!
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.