When a workflow is slow but you are not sure which node is the bottleneck, inspect individual node execution times in the execution detail view.
When a workflow is slow but you are not sure which node is the bottleneck, inspect individual node execution times in the execution detail view. You can also add instrumentation with Code nodes to measure time programmatically.
Real-world example: A data sync workflow takes 45 minutes to complete. The execution log reveals that 40 minutes are spent in a single HTTP Request node making sequential API calls.
To view execution times in the UI:
1. Open the workflow
2. Click "Executions" in the left sidebar
3. Select a completed execution
4. Each node shows its execution time in the bottom-right corner
5. Click a node to see detailed timing including:
- Start time
- Execution duration
- Number of items processed
```text
For programmatic profiling, add instrumentation Code nodes:
```javascript
// Code node: Start Timer (place before suspect section)
// Mode: Run Once for All Items
const startTime = Date.now();
// Store in static data so the end timer can read it
$workflow.staticData.profilingStart = startTime;
return $input.all();
```text
```javascript
// Code node: End Timer (place after suspect section)
// Mode: Run Once for All Items
const endTime = Date.now();
const startTime = $workflow.staticData.profilingStart || endTime;
const duration = endTime - startTime;
const items = $input.all();
items[0].json._profiling = {
sectionName: 'API Calls',
durationMs: duration,
durationFormatted: `${Math.floor(duration / 60000)}m ${Math.floor((duration % 60000) / 1000)}s`,
itemsProcessed: items.length,
msPerItem: items.length > 0 ? (duration / items.length).toFixed(1) : 0,
};
return items;
```text
| Bottleneck Pattern | Typical Cause | Solution |
|:-------------------|:-------------|:---------|
| Single node takes 90%+ time | Sequential API calls | Batch requests, parallel execution |
| Many nodes each take a few seconds | Large payload passed between nodes | Reduce payload size, remove unused fields |
| Loop iterations are slow | Rate limiting or large item payloads | Increase batch size, add delays strategically |
| Total time high, no single bottleneck | Too many nodes on canvas | Consolidate logic into fewer Code nodes |
**Related:** [Flatten Deeply Nested API Responses](../code-node-mastery/01-flatten-deeply-nested-api-responses.md) | [Use Docker Compose with Health Checks for n8n and PostgreSQL](../self-hosting-operations/01-use-docker-compose-with-health-checks-for-n8n-and-postgresql.md)
I build production n8n and Cloudflare automation for teams — the same engineering behind HarperFlow. Fixed-price, escrow-protected, US-based.