openclaw-windows-node/src
github-actions[bot] 0af3f95911
perf: pre-allocate arrays from JSON array length; replace LINQ sort with Array.Sort (#189)
Eliminates List<T>+ToArray() allocation in three JSON-parsing hot paths:

- TryGetHandshakeScopes: size string[] from GetArrayLength() upfront;
  avoid dynamic List<string> growth and second ToArray() copy.

- GetStringArrayArg (NodeCapabilities): same pattern; avoids List<string>
  on every capability command that receives an array argument.

- ParseNodeList: pre-size GatewayNodeInfo[] from GetArrayLength(); replace
  three-key LINQ sort chain with Array.Sort + static Comparison<T> delegate,
  eliminating the intermediate IOrderedEnumerable allocations.

Also adds 3 regression tests:
- ParseNodeListPayload_EmptyArray_ReturnsEmpty
- ParseNodeListPayload_SameOnlineStatus_SortsByLastSeenDescending
- ParseNodeListPayload_SkipsItemsWithNoNodeId

Test status: 633 Shared passed (+3), 20 skipped; 122 Tray passed.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 10:26:13 -07:00
..
OpenClaw.Cli feat: SSH tunnel gateway, device identity, reconnect hardening 2026-04-01 00:03:43 -07:00
OpenClaw.CommandPalette Improve web chat security UX and bump to 0.4.2 2026-02-16 21:49:13 -08:00
OpenClaw.Shared perf: pre-allocate arrays from JSON array length; replace LINQ sort with Array.Sort (#189) 2026-04-23 10:26:13 -07:00
OpenClaw.Tray.WinUI fix: address WinUI3 code review findings (#203) 2026-04-22 22:28:53 -07:00