wrolpi/modules/archive
lrnselfreliance 8e2ab935af
Archive search counts from the search index (#814)
The total for an archive search joined `archive LEFT JOIN file_group` to the FTS table. A LEFT JOIN
fixes `archive` as the outer table, so SQLite scanned every Archive and ran the MATCH once per row:
about 20 seconds of CPU on a Pi with 128k Archives, every time the 60-second totals cache expired.
An inner join lets the planner start from the FTS matches (the same count in milliseconds). Every
Archive has a FileGroup, so the count is unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:37:27 -06:00
..
test Archive search counts from the search index (#814) 2026-10-11 15:37:27 -06:00
__init__.py Upgrade to SQLAlchemy 2.0 (synchronous) (#803) 2026-10-09 15:08:40 -06:00
api.py Archive and doc pages record a view in its own write transaction (#813) 2026-10-11 14:13:50 -06:00
conftest.py test: do not leave videos_destination as an invalid template (#656) 2026-08-11 18:51:06 -06:00
errors.py Adding toggle to Channel page to stop downloading comments for certain channels. 2025-03-01 18:23:29 -07:00
lib.py Archive search counts from the search index (#814) 2026-10-11 15:37:27 -06:00
models.py Archive page: load history and tags eagerly (#809) 2026-10-09 19:45:13 -06:00
schema.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00