mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 01:16:15 -08:00
Pair the existing journal_mode=WAL with the companion pragmas it needs to actually pay off, and reduce read latency on hot query paths. - synchronous=NORMAL: ~2-10x faster writes when paired with WAL. Safe — only risks losing the last committed txn on power loss; DB stays consistent. - cache_size=-64000: 64MB page cache (default is 2MB). - temp_store=MEMORY: keep sort/group temp tables in RAM. - mmap_size=268435456: 256MB memory-mapped I/O for reads. Applied to both connection sites: the main read-write/read-only connection in libs/shared/database and the EPG worker connection in electron-backend. The per-connection pragmas (cache_size, temp_store, mmap_size) apply to the read-only agent-backend connection too. Inspired by matracey/iptvnator@4ad8f88; ported manually since the file has diverged significantly and the worker connection didn't exist in that fork. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 3d6901072049