mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-15 04:40:40 -07:00
list_stories() previously executed one COUNT(story_items) query per story in a Python loop. With N stories that is N+1 round-trips to SQLite regardless of list length. Replace with a single aggregated GROUP BY query that fetches all counts at once, then populate each StoryResponse from a dict lookup.