The content-warning include/exclude filter (and its count) ran a correlated page_content_warnings->pages->chapters join per candidate manga — O(mangas * pages) on every filtered list. Add a manga_content_warnings(manga_id, warning) table holding each manga's deduped warning union, maintained by triggers that recompute an affected manga's set (delete+reinsert of the tiny five-label set, robust across page/chapter/manga cascade deletes), backfilled in the migration. The filter is now a single indexed lookup. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
6.1 KiB
6.1 KiB