wheels optimize performance
Automatically applies performance optimizations to your CFWheels application based on analysis results.
Usage
Parameters
--target
- (Optional) Specific area to optimize:all
,database
,caching
,assets
,code
. Default:all
--aggressive
- (Optional) Apply aggressive optimizations that may change behavior--backup
- (Optional) Create backup before applying changes. Default: true--dry-run
- (Optional) Show what would be changed without applying
Description
The optimize performance
command automatically implements performance improvements identified through analysis. It can:
Add database indexes
Implement query result caching
Optimize asset delivery
Enable application-level caching
Refactor inefficient code patterns
Configure performance settings
Examples
Basic optimization
Optimize database only
Preview changes
Aggressive optimization
Skip backup
Optimization Targets
Database
Creates missing indexes
Optimizes slow queries
Adds query hints
Implements connection pooling
Configures query caching
Caching
Enables view caching
Implements action caching
Configures cache headers
Sets up CDN integration
Optimizes cache keys
Assets
Minifies CSS/JavaScript
Implements asset fingerprinting
Configures compression
Optimizes images
Sets up asset pipeline
Code
Refactors N+1 queries
Implements lazy loading
Optimizes loops
Reduces object instantiation
Improves algorithm efficiency
Output
Dry Run Mode
Preview changes without applying them:
Aggressive Mode
Enables optimizations that may change application behavior:
Backup and Rollback
Backups are created automatically:
Configuration
Customize optimization behavior in /config/optimizer.json
:
Notes
Always test optimizations in a staging environment first
Some optimizations require application restart
Monitor application after applying optimizations
Use
wheels analyze performance
to measure improvementsAggressive optimizations should be carefully reviewed
Last updated
Was this helpful?