Quick Performance Wins
1. Plan Ahead with Observe
Use a singleobserve() call to plan multiple actions, then execute them efficiently:
Performance Tip: Acting on
observe results avoids LLM inference entirely. This approach is 2-3x faster than direct act() calls and is the recommended pattern for multi-step workflows.Caching Guide
Learn advanced caching patterns and cache invalidation strategies
2. Optimize DOM Processing
Reduce DOM complexity before Stagehand processes the page:3. Set Appropriate Timeouts
Use shorter timeouts for simple operations and longer ones for complex page loads:Advanced Performance Strategies
Smart Model Selection
Use faster models for simple tasks, premium models only when needed:Model Configuration
Compare model performance and costs
Page Load Optimization
Skip unnecessary resources during page loads:Cost Optimization
Balance speed with cost considerations
Performance Monitoring and Benchmarking
Track performance metrics and measure optimization impact:Performance Tracking
Before vs After Benchmarking
Observability & Metrics
Set up comprehensive performance monitoring
Related Resources
Caching Strategies
Advanced caching patterns for maximum performance
Cost Optimization
Balance speed improvements with cost considerations
Browser Configuration
Optimize Browserbase settings for speed
Model Selection
Choose the right model for speed vs accuracy

