Doist

How Doist Optimizes GRDB in Todoist for iOS

Original post Optimizing GRDB in Todoist for iOS

Article Summary

The Todoist iOS team migrated from Realm to GRDB and immediately got flooded with complaints about sluggish performance. Their debugging journey uncovered a SQL trap that's probably lurking in your app too.

After switching Todoist's iOS local storage to GRDB, certain users experienced near-unusable performance during basic task operations. The culprit wasn't the framework itself but how associated values were being fetched. This deep dive walks through 40+ profiling sessions to find the root cause.

Key Takeaways

Critical Insight

A single project with 200 tasks, 100 completed tasks, and 30 comments was generating 600,000 intermediate SQL rows when it only needed to process 331.

Continue reading

The article reveals why commenting out suspected code and using an LLM to analyze SQL queries became essential debugging tools in this investigation.

This page summarizes “Optimizing GRDB in Todoist for iOS” by Doist, published Jan 27, 2026. All credit for the original work goes to the authors.

Read the original on doist.dev (opens in new tab)

AI tools for iOS

Browse all AI tools →