In the past couple of weeks, I’ve embarked on a significant overhaul of Sequel’s sync engine. While iCloud takes care of keeping your data in sync across devices, Sequel still needs to process your changes to and from iCloud. Until recently, this system worked pretty well.


Growing Pains

Occasionally, users would report that sync between devices could be slow. There was nothing obvious I could find and initially put this down to iCloud’s mysterious ways. The system isn’t always the fastest and, being mostly a black box, it can be hard to understand its inner workings.

Then came the heat… literally. These reports got more frequent after 2.1 but this time, some devices were getting hot when using the app. I was stumped. How was I going to debug a problem I couldn’t reproduce? The release of 2.2 only compounded the mystery, with a fresh wave of similar reports. What was going on?

A Lightbulb Moment

That’s when things started falling into place. I began connecting dots and a pattern emerged. This was a eureka moment! It all seems glaringly obvious in hindsights.

The launch of Sequel on visionOS and macOS with 2.2 meant users would load their existing (and potentially large) libraries onto new devices. As for Sequel 2.1, it added Trakt sync. Where it would previously take months to gather a large database, users could now import thousands of series and movies easily!

I even optimised these large imports, usually not taking more than a few seconds. However, I hadn’t anticipated what it meant when syncing with iCloud later on. Large amounts of data now needed to be processed and pushed to the service.

For all of iCloud’s quirks, the problems reported by users were my doing. Of course they were! The code that pushed changes to and from iCloud was designed for a simpler app, needing to process only a few changes at once. But Sequel had fundamentally changed.

Turning the Ship Around

My mistake was in not reassessing my assumptions. My experience of iCloud had taught me that sometimes it behaved in ways I was not expecting. My knowledge of Sequel had lead me to believe that its sync worked well for its purpose. I failed to realise that this purpose had changed as Sequel evolved.

So I rolled up my sleeves, rewrote the sync engine from scratch, and created a benchmark to quantify the improvement. Tasks that previously took an agonising 12 minutes (and a very warm phone) now takes just 5 seconds. This will significantly enhance the experience of users with larger libraries and reduce Sequel’s battery footprint.


Looking Ahead

The new sync engine is still being tested, but I’m hopeful that I’ll roll it out in the next week or so, making Sequel faster and cooler (in more ways than one).

This experience has been a humbling reminder that assumptions should be challenged, especially as a project evolves. Recognising and addressing your biases isn’t easy, but is crucial for growth. This is going to be a cornerstone of my approach to problem-solving and will undoubtedly shape how Sequel evolves.