What 557 Thoughts Taught Me About Loading a Notes App
How a real collection of thoughts changed ThinkAloud's loading strategy, from full-list queries to incremental loading and database filters.
An empty notes app tells you very little about how it will feel after months of use. A handful of test entries makes almost any loading strategy look reasonable.
During ThinkAloud development, one device held 557 Thoughts and 13 Documents. That collection made the cost of loading whole lists harder to ignore. It also changed the task: improve responsiveness while preserving the existing material.
Ask for what the screen needs
The Think home screen shows recent entries, so its first query now asks for the latest ten Thoughts. The full Thoughts list loads thirty entries at a time, and Documents loads twenty.
The lists use lazy construction rather than building every row up front. Switching between tabs retains the loaded data and scroll position instead of starting another full query.
These changes address separate costs. A lazy list alone does not stop the database from returning too much data. A smaller query alone does not prevent unnecessary reloads.
Give pagination a stable order
The pagination cursor uses creation time together with the entry ID. The second field provides a tie-breaker when entries share a timestamp. Matching database indexes support the queries; the database upgrade adds those indexes without rewriting the saved text.
Keyword, organization status, source, and date filters run in SQL. Search also waits briefly after typing before issuing a query. Filtering only the first loaded page in memory would give an incomplete answer, so the database needs to apply the filters before choosing the page.
Selection must survive the page boundary
Thoughts can be selected for a batch operation or a new document. Selection therefore tracks IDs across loaded pages. The operation reads the full selected entries when it runs, rather than relying on whichever row objects happen to be visible.
This is the part of pagination that is easy to miss: loading fewer rows should not quietly change what a user’s selection means.
Verify the upgrade with existing data
The recorded device checks included the database upgrade, cold launch, scrolling beyond the first page, opening Documents, and date filtering. The existing collection remained available. Those checks describe specific devices and a particular build, not a performance guarantee for every phone.
The lesson is practical: real saved content belongs in the development process early. It reveals costs that a polished empty screen conceals. See ThinkAloud’s current workflow for the user-facing result.