#2891·d2

TALA in v0.9.0 fails with "route-search work limit exceeded" on a 120-node / 100-edge diagram that the 0.4.3 plugin laid out fine

Author: orange-buffaloCreated Sep 9, 2026Updated Sep 9, 2026

Since TALA became bundled in v0.9.0, diagrams that the standalone d2plugin-tala 0.4.3 rendered without trouble now fail to compile. The engine gives up after ~2 s on a hard-coded work cap rather than taking longer, and there seems to be no way to raise it.

Repro

Generate a diagram of 40 containers with 3 nodes each and 100 cross-container connections:

python
import itertools
nodes = [f"c{c}.n{n}" for c in range(40) for n in range(3)]
pairs = [(a, b) for a, b in itertools.combinations(nodes, 2)
         if a.split('.')[0] != b.split('.')[0]]
step = len(pairs) // 100
lines = []
for c in range(40):
    lines.append(f"c{c}: Container {c} {{")
    lines += [f"  n{n}: Node {n}" for n in range(3)]
    lines.append("}")
lines += [f"{a} -> {b}" for a, b in pairs[::step][:100]]
open("repro.d2", "w").write("\n".join(lines) + "\n")
$ d2 --layout tala repro.d2 out.svg
err: failed to compile repro.d2: all TALA seed attempts failed: seed 1: TALA route-search work limit exceeded: TALA EdgeRouting flavor TopDownLeftRight work exceeds limit 120000000
err: seed 2: TALA route-search work limit exceeded: TALA EdgeRouting flavor TopDownLeftRight work exceeds limit 120000000
err: seed 3: TALA route-search work limit exceeded: TALA EdgeRouting flavor TopDownLeftRight work exceeds limit 120000000

Expected

The diagram lays out, as it does with the pre-0.9.0 engine:

engine result
d2 0.7.1 + d2plugin-tala 0.4.3, --layout tala renders in ~10 s
d2 0.9.0 bundled TALA, --layout tala fails in ~2 s (above)
d2 0.9.0, --layout elk renders in <1 s

Notes

  • The threshold is low and sits on connection count: with the same 120 nodes, 80 connections render, 100 fail. Edge labels make no difference.
  • Raising the seed count does not help - --tala-seeds 12 fails the same way on every seed.
  • At 180 connections the error changes to TALA OVG resource limit exceeded: node count 200001 exceeds limit 200000.
  • --timeout / D2_TIMEOUT has no effect here: the run above passes --timeout 300 and still gives up after ~2 s, because the caps bound work units rather than wall-clock time.
  • The caps look like compile-time constants (maxRouteSearchWorkUnits, maxOVGWorkUnits, maxRouteStageWorkUnits in d2layouts/d2talalayout/internal/routing), so there is no flag or environment variable to trade time for a completed layout.

Ask

Could these caps be made configurable - a flag and/or a D2_TALA_* environment variable, alongside the existing --tala-seeds? D2 already lets a caller say "this may take longer" through --timeout / D2_TIMEOUT; the work caps sit outside it, so there is currently no way to spend more time on a diagram the engine considers too expensive. A knob would let callers who accept a slower layout keep rendering the diagrams the 0.4.3 plugin handled. Tested with the official d2-v0.9.0-linux-arm64 release binary on Ubuntu 24.04 (arm64).