Case study · Performance

HeyWeather

A weather app on the App Store with a 4.5-star rating across about 5,900 ratings. I found and fixed 4 hangs and more than 12 micro-hangs, built the iPad layout, added Mac Catalyst, and led three engineers.

Role
iOS Engineer, part-time contract
When
Nov 2023 to Dec 2024
Stack
Swift · SwiftUI · UIKit · Mac Catalyst · Instruments
Result
4 hangs + 12 micro-hangs fixed · 4.5★ (5.9K ratings)
Overview

A popular app that sometimes froze

HeyWeather is a weather forecast app on the App Store, rated 4.5 stars across about 5,900 ratings. It runs on iPhone, iPad, Apple Watch and Mac.

I worked on it as a part-time iOS engineer from November 2023 to December 2024, alongside my job at Coinlocally. I had three jobs there: find out why the app sometimes froze, bring it properly to iPad and Mac, and lead a small team of three engineers day to day.

Hangs

Finding where the time went

Users do not file a bug that says "the main thread was blocked for 400 milliseconds". They say the app feels stuck, and then they stop opening it. So I started with measurement instead of guesses.

Profiling with Instruments and Xcode's hang reports turned up 4 hangs and more than 12 micro-hangs. Most of them came from two places.

  • Expensive SwiftUI view builders. Some views did real work inside body: formatting, sorting and building data that should have been ready before the view asked for it. Since SwiftUI can call body many times, that cost was paid again on every update. I moved the work out of the view builders and split large views so a small change only re-rendered the part that changed.
  • Memory leaks. Using Xcode's memory graph debugger, I found retain cycles that kept old objects alive and made the app heavier the longer it ran. Breaking those cycles removed a slow, steady drag that was hard to see in a single session.

This is close to what The Pragmatic Programmer calls fixing broken windows. None of these were dramatic. Each one alone was easy to ignore, and together they were the reason the app felt slow.

Platforms

iPad and Mac, done properly

I built the iPad layout so the app uses the larger screen instead of showing a stretched phone UI. I also added Mac Catalyst support, so the same codebase runs as a Mac app.

The shared code stayed shared, and the presentation changed per device. Those boundaries are where most of the design work actually was.

Team

Leading three engineers

I led three engineers on the team day to day: reviewing code, splitting work, and helping when someone was stuck. One example I remember well: a UIKit view wrapped inside SwiftUI was misbehaving on Apple Watch, and we debugged it together. It was a good reminder that bridging two UI frameworks works until a platform with different rules shows up, and then you need to understand both sides of the bridge.

Results

What changed

4 + 12
Hangs and micro-hangs fixed
Through view builder work and leak fixes found with the memory graph debugger.
2
New platforms
An iPad layout and a Mac Catalyst version.
4.5★
App Store rating
Across about 5,900 ratings.
Looking back

What I took away

  • Measure before you fix. My first guesses about the hangs were not where the time actually went.
  • Keep body cheap. In SwiftUI, a view builder is called far more often than it looks. Anything slow in there is slow many times.
  • Small problems add up. No single micro-hang was serious. Twelve of them were the whole experience.