comparison · c_01304e7d0f46 (tommy-mor) vs c_8337e9dd0f87 (tommy-mor)
Side B is a small, targeted concurrency fix that prevents readers from stalling behind pending writers on a hot page render path, a real correctness/performance bug with clear rationale. Side A is a larger refactor unifying DOM ids/actions across public/room forms, which improves clarity but is mostly renaming/restructuring churn with no bugfix, and carries more risk of regressions across multiple files and tests.
B fixes a real concurrency hazard by precomputing room_members_section_markup and dropping the Tokio RwLock read guard before layout/HTML stringify, avoiding reader stall behind writers during ingest. A is a worthwhile DOM/action unify of public vs room new-thread forms, but mostly structural dedup and selector renames without the same correctness impact.
Side B fixes a concrete concurrency issue by precomputing `room_members_section_markup`, dropping the `tokio::sync::RwLock` read guard before expensive page layout/stringification, and avoiding reader stalls when a writer is waiting. Side A is primarily a broad refactor that unifies public and room new-thread UI IDs, actions, and markup; while it reduces duplication and standardizes behavior, it is mostly structural and also changes UI behavior rather than addressing a clear correctness or performance problem.
comparison · c_8337e9dd0f87 (tommy-mor) vs c_a28a6860976d (tommy-mor)
B is a substantive algorithmic refactor that replaces an O(n²) sort-based pairing scheme with a simpler linear-scan approach, preserving behavior (tests kept, semantics documented) while improving performance and reducing complex enum/sort-key machinery. A is a small, valid concurrency fix (releasing a read lock earlier to avoid writer starvation) but is narrower in scope and impact compared to B's broader design simplification with performance benefits.
B replaces an O(n²) candidate-sort that re-derived rank-centrality keys per pair with linear attach/bridge growth plus a single zip pass after one RC order, which is a lasting core-algorithm and scalability fix. A correctly drops the Tokio read guard before layout so writers are not blocked, but that is a localized locking hygiene fix on one handler versus B’s broader complexity and performance win.
Side B substantially redesigns the pair-selection algorithm by replacing per-candidate priority/key computation with a staged approach: linear graph-growth scans (`suggest_grow_pair`), a single rank-centrality pass with adjacent-rank zipping (`zip_adjacent_pair`), and simplified fallback logic. This removes the previous O(n²)-style ranking work while preserving behavior through targeted helper functions, whereas Side A is a focused concurrency improvement that simply precomputes `room_members_section_markup` and drops an `RwLock` read guard before expensive HTML rendering to reduce lock contention.