You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
describe is exponential in nested decisions with a layout-config preset #1989
With .claude/layout-config.yaml set to preset: true-right-false-down, describe microflow takes time that doubles with every nested decision. A flow of 58 chained decisions never finishes. Without the config file the same flows describe in about 0.3 s, at any depth.
Shape: a chain of if … then return …; else if … with no merges. Each decision returns on true and continues on false to the next decision. This is a common "classify the input" function.
Reproduction (generate the chain with N decisions, positions optional):
mdl 1;
create or modify microflow M."Chain" ($s: String) returns String
begin
if $s = 'v0' then
return 'r0';
else
if $s = 'v1' then
return 'r1';
else
-- … N levels …
return empty;
end if;
end if;
end;
describe microflow M.Chain, decisions in one column (false from bottom to top, true to the right):
N
with preset
without preset
20
1.3 s
0.3 s
22
4.0 s
0.3 s
24
20 s
0.3 s
26
75 s
0.3 s
28
> 120 s
0.3 s
58
never finishes
0.3 s
The same happens with describe module … --all, which stops at the first such flow.
Expected: describe time linear in the number of elements, also with a layout preset (for example, memoise the per-branch layout instead of recomputing it for every enclosing decision).
Activity