← Commit history

0.2.83 (unreleased): the agent joins lists in one pass (was quadratic): the Sentinel's board model reads in 3.3 s, not 70; move_parts there answers in 9.6 s

Colby Knox ·5e9347bb8f · ·parent 46414cb
2 files changed +10−8
CHANGELOG.md+5
@@ -2,6 +2,11 @@  ## 0.2.83 (unreleased) +- **Large boards read about 20 times faster.** The agent joined each list of the board model by appending to one growing+  string, copying it whole for every item: quadratic, so the Bluetooth Sentinel's 9381 tracks took about 70 s per+  `routing_state`, and an edit (a guard read, then a read-back) ran past the relay's 120 s. The list now joins in one+  pass: 3.3 s per read, and `move_parts` on the Sentinel answers in 9.6 s with its read-back. Every verb that reads the+  board model gains (routing, checks, planners, pours, violations, silkscreen). - **Turned parts' 3D bodies are compared by their own rectangles** (EDA Bridge Standard #26, engine 0.20.0 / standard   0.23.0, vendored as published). `altium_bodies` sends `{cx, cy, w, h, rotation}` for a part turned off the 90-degree   grid, measured from the body's outline in the part's frame, so `height_check`'s collisions and gaps are exact where the
src/agent/AdomAgent.pas.tmpl+5−8
@@ -6021,18 +6021,15 @@ End;     polys    ["net",layer,[[x,y],...]]     outline  [[x,y,kind,cx,cy,radius,angle1MilliDeg,angle2MilliDeg],...]  kind 1 = an arc to the next vertex     unrouted the ratsnest connection count (connection objects on the board) }+{ The list as a JSON array. S := S + item copied the whole growing string for every item: quadratic, about 70 s for+  the Bluetooth Sentinel's 9381 tracks (2026-10-29). Each item takes its own comma and TStringList joins them in one+  pass (its line breaks are JSON whitespace). The list is spent: every caller frees it after. } Function JoinList(L : TStringList) : String; Var     I : Integer;-    S : String; Begin-    S := '';-    For I := 0 To L.Count - 1 Do-    Begin-        If I > 0 Then S := S + ',';-        S := S + L[I];-    End;-    Result := '[' + S + ']';+    For I := 0 To L.Count - 2 Do L[I] := L[I] + ',';+    Result := '[' + L.Text + ']'; End;  Function NetOf(Prim : IPCB_Primitive) : String;