Kid mode ๐Ÿง’

This page is The phone chat-index loop was wedged. Now a tick takes 4 seconds.. It is one of the projects Brandon built and put online. The grown-up details are below, tap Grown-up mode to read them the normal way.

drwu-htmls ยท infra fix ยท 2026-06-07

The phone chat-index loop was wedged. Now a tick takes 4 seconds.

The 5-min com.drwu.phone-chat-index job re-renamed and re-tagged all ~1,200 chats on every tick, so a 20-minute job could never fit a 5-minute window. It fell permanently behind and froze the live /chats board.

~20+ min
old full tick
4.07 s
new full tick
1,183 ร—2
old renames / tick
1โ€“4
new renames / tick

What was actually wrong โ€” two compounding faults

The fix โ€” a per-cid change cache

Convergence โ€” renames applied per tick

warm-up
1,183
tick +1
4
tick +2
1
idle tick
0

One warm-up tick populates the cache (one-time). After that, only live sessions whose transcripts are still being written get re-titled โ€” exactly the chats that should update. An idle tick does zero work and writes no backup.

Before โ†’ after

MetricBeforeAfter
Full refresh_phone_chat_index.sh tick~20+ min (overran 300s)4.07 s
rename_chats_caps.py (steady)~all 1,183 rewritten0.82 s ยท 0โ€“4 rewritten
tag_chats_categories.py (steady)reads all ~1,200 transcripts0.85 s ยท skips unchanged
Transcripts read per tick~1,200only changed ones
~200 KB backup per tickalways (ร—2)only on real change
Loop vs 300s intervalwedged / behindfits in <5 s

Files changed