Docs / Strand / advanced/performance
Performance Optimization
Tips for optimizing workflow performance in Strand.
Overview#
Optimize your workflows for better performance, lower latency, and reduced resource usage.
Best Practices#
Node Configuration#
Efficient Nodes
- ✅ Use filters early to reduce processing
- ✅ Minimize unnecessary transformations
- ✅ Cache frequently accessed data in Variables
- ✅ Use connectors for reusable configurations
Parallel Execution#
Workflows automatically execute independent nodes in parallel:
code
┌─→ [Process A]
[Start] ├─→ [Process B] ← These run in parallel
└─→ [Process C]
Parallelism
Nodes that don't depend on each other execute simultaneously, reducing total workflow execution time.
Data Size#
Large Payloads
- Keep payload sizes reasonable (< 10MB recommended)
- Filter data early to reduce downstream processing
- Use JSONPath to extract only needed fields
Template Performance#
- Direct field access is faster than JSONPath
- Use JSONPath only when needed for complex queries
- Cache computed values when possible
HTTP Requests#
- Use connectors to reuse connections
- Batch requests when possible
- Handle timeouts appropriately
- Use appropriate HTTP methods (GET for reads, POST for writes)
Monitoring#
Execution Time#
Monitor workflow execution times in the Runs page:
- Identify slow nodes
- Optimize bottlenecks
- Track performance over time
Resource Usage#
- Keep an eye on which workflows run most frequently and how much data they process
- Split very high-volume workflows into smaller, focused ones where possible
- Optimize workflows that consume excessive resources (see the strategies below)
Optimization Strategies#
1. Filter Early#
code
[Event] → [Filter] → [Process] ← Filter before processing
2. Minimize Transformations#
Only transform data when necessary. Each transform adds processing time.
3. Use Appropriate Node Types#
- Use Filter for conditions (faster than conditional edges)
- Use Transform only when reshaping data
- Use Print sparingly (adds logging overhead)
4. Optimize Templates#
Fast:
jinja
{{ payload.user_id }}
Slower (but more flexible):
jinja
{{ payload | jsonpath('$.user.id') }}
Use the right tool for the job!
Related#
- Node Types Reference - Choosing the right nodes
- Templating - Efficient templating
Tendrl