perf: denormalize content-warning filter to manga_content_warnings

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>
This commit is contained in:
MechaCat02
2026-07-11 14:24:31 +02:00
parent d749b56d58
commit c11df3182c
6 changed files with 150 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "mangalord"
version = "0.124.22"
version = "0.124.23"
edition = "2021"
default-run = "mangalord"