mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 03:46:29 -05:00
* collections: channel listing reads trigger columns and batch-loads tag/downloads Listing channel collections summed FileGroup sizes through a video join, which reads a random page of the file_group table per video, and lazy-loaded every collection's tag and downloads one query at a time. On a large library with a cold disk cache the listing took over two minutes, past the browser's 60 s timeout, so the Channels page showed an error. channel.video_count and channel.total_size are already maintained by triggers (wrolpi/schema_ddl.py), so read those. Tag and downloads are selectin-loaded, so the query count no longer grows with the number of collections. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * collections: domain listing reads trigger-maintained summary columns Domain Collections summed file_group.size through an archive join on every listing, one random page read per archive (about 9 s from a cold disk cache on a large library). New triggers keep collection.item_count and collection.total_size current for Domain Collections, as the channel triggers already do for Channels, and the listing reads those columns. A migration installs the triggers and backfills existing Domain Collections. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| fixtures/configs | ||
| __init__.py | ||
| common.py | ||
| test_api_fixtures.py | ||
| test_api_utils.py | ||
| test_bookmarks.py | ||
| test_captions.py | ||
| test_cmd.py | ||
| test_common.py | ||
| test_config_api.py | ||
| test_config_backup_import.py | ||
| test_config_partial_import.py | ||
| test_contexts.py | ||
| test_cross_config_disaster_recovery.py | ||
| test_dates.py | ||
| test_db.py | ||
| test_db_bootstrap.py | ||
| test_downloader.py | ||
| test_downloads_config.py | ||
| test_events.py | ||
| test_extensions.py | ||
| test_flags.py | ||
| test_fts.py | ||
| test_jobs.py | ||
| test_perpetual.py | ||
| test_root_api.py | ||
| test_rss.py | ||
| test_speedtest.py | ||
| test_switches.py | ||
| test_tags.py | ||
| test_upgrade.py | ||