Skip to main content

MAX_DIFF_CELLS

Constant MAX_DIFF_CELLS 

Source
const MAX_DIFF_CELLS: usize = 4_000_000;
Expand description

Cap on the LCS table’s cell COUNT (from_lines.len() * to_lines.len()), not on either side’s line count independently — reagent P1: the original per-side-only cap (20,000 lines each) bounded neither dimension against the other, so two files each under that cap could still produce a ~3.2GB usize table (20_000 * 20_000 * 8 bytes) in the shared agentmux-srv process. 4,000,000 cells keeps the table under ~32MB (* size_of::<usize>()) regardless of how the two side lengths are distributed — generous for memory files (markdown notes, not logs) while still bounded for any combination of sizes.