Performance Optimization
Tips for building efficient, fast workflows
Efficient workflows execute faster, cost less, and provide better user experiences. This guide covers optimization techniques for building high-performance automations.
Performance Factors
What Affects Performance
| Factor | Impact | Controllable? |
|---|---|---|
| Node count | More nodes = more processing | Yes |
| AI model tier | Higher tiers = slower | Yes |
| Input data size | Larger data = slower processing | Partially |
| External API speed | Varies by service | No |
| Parallel vs serial | Parallel is faster | Yes |
| Network latency | Varies | No |
Performance Budgets
| Node Type | Typical Time | Timeout |
|---|---|---|
| Load Meeting | 1-3 seconds | 30s |
| AI Prompt (medium) | 5-15 seconds | 120s |
| AI Agent | 15-60 seconds | 120s |
| Slack Post | 1-2 seconds | 30s |
| Email Send | 1-2 seconds | 30s |
| CRM operations | 2-5 seconds | 30s |
Optimization Strategies
1. Use Parallel Processing
Run independent operations concurrently:
❌ Sequential (slow):
[Load] ──▶ [AI: Summary] ──▶ [AI: Items] ──▶ [Combine]
Time: 5s + 10s + 10s = 25s
✅ Parallel (fast):
┌──▶ [AI: Summary] ──┐
[Load] ──┤ ├──▶ [Zip]
└──▶ [AI: Items] ───┘
Time: 5s + max(10s, 10s) = 15s
2. Choose Appropriate Model Tiers
Match AI complexity to task complexity:
| Task | Recommended Tier |
|---|---|
| Yes/no classification | low (fast, cheap) |
| Simple summarization | medium |
| Complex analysis | high (slow, expensive) |
| Simple extraction | low or medium |
Example:
[AI: Classify urgency] ──▶ model: low (fast)
[AI: Generate report] ──▶ model: high (thorough)
3. Minimize AI Input Size
Large inputs slow down AI nodes:
❌ Full transcript (slow):
{{ json.callRecording.transcript }}
// Could be 10,000+ words
✅ Summary first (fast):
{{ json.callRecording.transcriptSummary }}
// ~500 words
Strategy: Use transcriptSummary unless you need full detail.
4. Batch Similar Operations
Group similar actions when possible:
❌ Individual calls:
[Select Many] ──▶ [API Call] ──▶ (N separate calls)
✅ Batch when available:
[Process All] ──▶ [Single Batch API Call]
Note: Some operations must be per-item (like individual emails).
5. Filter Early
Remove unwanted items before expensive processing:
❌ Process then filter:
[AI: Analyze all] ──▶ [If: relevant?] ──▶ [Use result]
✅ Filter then process:
[If: relevant?] ──▶ [AI: Analyze relevant only]
6. Reduce Unnecessary Loads
Don't load data you don't need:
❌ Load always:
[Trigger] ──▶ [Load Meeting] ──▶ [If: needs data?]
✅ Load when needed:
[Trigger] ──▶ [If: needs data?] ──▶ [Load Meeting]
7. Use Appropriate Execution Mode
Choose per-item vs batch wisely:
| Scenario | Mode | Reason |
|---|---|---|
| Send individual emails | Per-item | Each needs separate send |
| Combine for single summary | Batch | Need all data together |
| Process independently | Per-item | Can parallelize |
8. Simplify Prompts
Concise prompts are faster:
❌ Verbose:
You are an AI assistant. Your job is to help with meetings.
Please carefully read the following meeting transcript and
then provide a summary. The summary should be comprehensive
but also concise. Make sure to include key points...
[200 more words of instructions]
✅ Concise:
Summarize this meeting in 2-3 sentences. Focus on decisions and action items.
Monitoring Performance
Check Execution Times
Review execution logs for timing:
- Total workflow duration
- Per-node duration
- Identify slowest nodes
Identify Bottlenecks
Common bottlenecks:
- AI nodes (especially high tier)
- Sequential dependencies
- Large data processing
- External API calls
Performance Metrics
Track over time:
- Average execution time
- 95th percentile execution time
- Timeout rate
- Error rate
Timeout Management
Avoiding Timeouts
AI nodes timeout at 120 seconds. To avoid:
- Reduce input size - Use summaries instead of full transcripts
- Simplify prompts - Remove unnecessary instructions
- Lower model tier - If quality allows
- Split complex tasks - Multiple simpler AI calls
Handling Timeouts
When timeouts might occur:
[AI: Complex task]
├── Success ──▶ [Use result]
└── Error ────▶ [AI: Simpler fallback] ──▶ [Use fallback]
Cost Optimization
Performance and cost often align:
| Optimization | Performance | Cost |
|---|---|---|
| Lower model tier | Faster | Cheaper |
| Smaller inputs | Faster | Cheaper |
| Fewer AI calls | Faster | Cheaper |
| Early filtering | Faster | Cheaper |
AI Token Usage
Monitor token usage:
- Prompt tokens (input)
- Completion tokens (output)
- Total cost per execution
Reducing Token Usage
- Use summaries instead of full text
- Limit output length in prompts
- Use lower tiers for simple tasks
- Combine prompts when possible
Architecture for Performance
Design Patterns
Fast path / slow path:
[Quick check]
├── Simple case ──▶ [Fast processing]
└── Complex case ─▶ [Full processing]
Progressive processing:
[Quick summary] ──▶ [If: needs detail?] ──▶ [Deep analysis]
Parallel fan-out:
┌──▶ [Task A] ──┐
[Start] ─┼──▶ [Task B] ──┼──▶ [Combine] ──▶ [End]
└──▶ [Task C] ──┘
Performance Best Practices
| Practice | Impact |
|---|---|
| Parallelize independent tasks | Significant |
| Use appropriate model tiers | Significant |
| Minimize AI input size | Moderate |
| Filter before expensive operations | Moderate |
| Keep prompts concise | Moderate |
| Avoid unnecessary loads | Low-Moderate |
| Choose right execution mode | Low |
Performance Checklist
Before releasing, verify:
- AI nodes use appropriate model tiers
- Independent operations are parallel
- AI inputs are reasonably sized
- Unnecessary processing is filtered out
- No redundant data loads
- Prompts are concise
- Expected execution time is acceptable
Example: Optimized Workflow
Before optimization:
[Trigger] ──▶ [Load Meeting]
──▶ [AI High: Summarize full transcript]
──▶ [AI High: Extract items from full transcript]
──▶ [AI High: Analyze sentiment from full transcript]
──▶ [Combine all]
──▶ [Send]
Time: ~60-90 seconds
After optimization:
[Trigger] ──▶ [Load Meeting]
│
├──▶ [AI Medium: Summarize from summary] ──┐
├──▶ [AI Low: Extract items from summary] ─┼──▶ [Zip] ──▶ [Send]
└──▶ [AI Low: Classify sentiment] ─────────┘
Time: ~15-25 seconds
Optimizations applied:
- Parallel processing (3 AI nodes run concurrently)
- Lower model tiers where appropriate
- Use transcript summary instead of full transcript
- Simpler task prompts