Performance Tuning and Error Handling
Performance questions focus on reducing data volume early and avoiding unnecessary passes. Techniques: filter and select fields as early as possible, avoid Append Fields on large inputs (cartesian explosion), prefer Join over repeated Find Replace, and use Sample to prototype on a subset. The Auto Field tool shrinks field sizes (e.g., Int64 to Int16), reducing memory. Sort is expensive; only sort when required by a downstream tool (e.g., Multi-Row Formula ordering).
Error handling: the Message tool (with severity Message/Warning/Error) surfaces custom errors; the Test tool validates conditions and can stop a workflow. The Error Message and Output anchors on tools let you capture rejects - e.g., the Join's Left/Right/Join anchors, or the Dynamic Input's error output. A common trap is assuming a tool error stops the workflow; only an Error-severity Message or a failed Test halts execution, while warnings continue.
Traps: leaving Browse tools in a production workflow adds overhead; unused tools still execute if enabled. Caching can mask performance problems during development.
Rule of thumb: filter rows and select only needed columns at the top of the workflow; measure before optimizing.
Worked example: a workflow joins 5M rows to a 10-row lookup. Append Fields would create 50M rows; a Join on key keeps it at 5M. Use Join, not Append.