sf-agent-framework
Version:
AI Agent Orchestration Framework for Salesforce Development - Two-phase architecture with 70% context reduction
361 lines (263 loc) • 8.76 kB
Markdown
# Performance Optimization Checklist
This comprehensive checklist guides systematic performance optimization for
Salesforce implementations, covering all layers from database to user interface.
## Database Optimization
### Level 1: SOQL Optimization
- [ ] Selective WHERE clauses using indexed fields
- [ ] LIMIT clause used appropriately
- [ ] Fields in SELECT limited to necessary only
- [ ] Relationship queries minimized
- [ ] NOT operators avoided where possible
### Level 2: Query Patterns
- [ ] N+1 query patterns eliminated
- [ ] Bulk query patterns implemented
- [ ] Subqueries used efficiently
- [ ] Aggregate queries optimized
- [ ] SOSL used for text searches
### Level 3: Indexing Strategy
- [ ] Custom indexes requested for large data volume queries
- [ ] Skinny tables implemented for wide objects
- [ ] External IDs indexed
- [ ] Deterministic formula fields for filtering
- [ ] Index usage verified with Query Plan
### Level 4: Data Architecture
- [ ] Archival strategy implemented
- [ ] Data skew addressed
- [ ] Ownership skew resolved
- [ ] Lookup skew mitigated
- [ ] Big objects utilized for historical data
## Apex Code Optimization
### Level 1: Bulkification
- [ ] All triggers bulkified
- [ ] Batch Apex used for large operations
- [ ] Collections used efficiently
- [ ] Loops minimized
- [ ] DML operations consolidated
### Level 2: Governor Limits
- [ ] SOQL queries < 50% of limit
- [ ] DML statements minimized
- [ ] CPU time optimized
- [ ] Heap size managed
- [ ] Callouts batched effectively
### Level 3: Efficient Patterns
- [ ] Lazy loading implemented
- [ ] Caching strategies applied
- [ ] Map data structures used for lookups
- [ ] String concatenation optimized
- [ ] Describe calls cached
### Level 4: Asynchronous Processing
- [ ] Future methods used appropriately
- [ ] Queueable Apex for chaining
- [ ] Batch Apex for large volumes
- [ ] Platform Events for decoupling
- [ ] Scheduled Apex optimized
### Level 5: Code Efficiency
- [ ] Recursive triggers prevented
- [ ] Static variables for caching
- [ ] Efficient algorithms used
- [ ] Early exits implemented
- [ ] Complex calculations minimized
## Lightning Performance
### Level 1: Component Design
- [ ] Component granularity optimized
- [ ] Unnecessary re-renders prevented
- [ ] Reactive properties minimized
- [ ] Component initialization optimized
- [ ] Event handling efficient
### Level 2: Data Management
- [ ] Lightning Data Service utilized
- [ ] Caching implemented
- [ ] Lazy loading for large lists
- [ ] Pagination implemented
- [ ] Progressive rendering used
### Level 3: Network Optimization
- [ ] Server calls minimized
- [ ] Batch operations used
- [ ] Payload sizes reduced
- [ ] Compression enabled
- [ ] CDN utilized for static resources
### Level 4: Rendering Performance
- [ ] DOM manipulation minimized
- [ ] CSS animations used over JavaScript
- [ ] Virtualization for long lists
- [ ] Image optimization applied
- [ ] Web fonts optimized
### Level 5: Mobile Optimization
- [ ] Mobile-specific layouts used
- [ ] Touch interactions optimized
- [ ] Offline capabilities implemented
- [ ] Resource loading prioritized
- [ ] Battery usage considered
## Visualforce Optimization
### Level 1: Page Size
- [ ] View state size < 135KB
- [ ] Unnecessary components removed
- [ ] Transient variables used
- [ ] Read-only pages where applicable
- [ ] Pagination implemented
### Level 2: Rendering
- [ ] Partial page updates used
- [ ] JavaScript remoting for data
- [ ] Lazy loading implemented
- [ ] Static resources combined
- [ ] Browser caching leveraged
### Level 3: Controller Optimization
- [ ] Controller logic minimized
- [ ] Action methods efficient
- [ ] Properties calculated once
- [ ] Database calls batched
- [ ] View state variables minimized
## Flow and Process Builder
### Level 1: Design Efficiency
- [ ] Flows consolidated where possible
- [ ] Decision elements minimized
- [ ] Loops used sparingly
- [ ] Subflows for reusability
- [ ] Fast field updates used
### Level 2: Query Optimization
- [ ] Get Records elements limited
- [ ] Filters selective
- [ ] Related records queried efficiently
- [ ] Collection variables used properly
- [ ] Bulk patterns implemented
### Level 3: Performance Patterns
- [ ] Before-save flows for field updates
- [ ] After-save flows for related records
- [ ] Scheduled flows for batch operations
- [ ] Platform events for async
- [ ] Invocable methods for complex logic
## Integration Performance
### Level 1: API Optimization
- [ ] Composite API used for multiple operations
- [ ] Bulk API for large data volumes
- [ ] Streaming API for real-time
- [ ] Batch sizes optimized
- [ ] Compression enabled
### Level 2: Callout Optimization
- [ ] Connection pooling implemented
- [ ] Timeout values appropriate
- [ ] Retry logic efficient
- [ ] Caching for external data
- [ ] Parallel callouts where possible
### Level 3: Middleware Optimization
- [ ] Message queuing implemented
- [ ] Transformation efficiency verified
- [ ] Routing logic optimized
- [ ] Error handling efficient
- [ ] Monitoring overhead minimized
## Reports and Dashboards
### Level 1: Report Optimization
- [ ] Report filters selective
- [ ] Custom report types efficient
- [ ] Summary levels appropriate
- [ ] Row limits applied
- [ ] Indexed fields used
### Level 2: Dashboard Performance
- [ ] Component count limited
- [ ] Refresh schedules staggered
- [ ] Filtered dashboards used
- [ ] Source reports optimized
- [ ] Dynamic dashboards used sparingly
### Level 3: Analytics Optimization
- [ ] SAQL queries optimized
- [ ] Dataflows scheduled appropriately
- [ ] Recipe performance tuned
- [ ] Data sync optimized
- [ ] Lens performance checked
## Platform Features
### Level 1: Caching
- [ ] Platform Cache utilized
- [ ] Session cache for user data
- [ ] Org cache for shared data
- [ ] Cache partitions sized correctly
- [ ] TTL values appropriate
### Level 2: Big Objects
- [ ] Historical data moved to Big Objects
- [ ] Async SOQL used effectively
- [ ] Indexes defined properly
- [ ] Query patterns optimized
- [ ] Standard objects archived
### Level 3: Event-Driven Architecture
- [ ] Platform Events for decoupling
- [ ] Change Data Capture utilized
- [ ] Streaming API implemented
- [ ] Event replay configured
- [ ] Error handling robust
## Mobile Performance
### Level 1: Offline Optimization
- [ ] Priming queries optimized
- [ ] Cached data minimized
- [ ] Sync frequency appropriate
- [ ] Conflict resolution efficient
- [ ] Storage limits considered
### Level 2: Mobile Layouts
- [ ] Compact layouts used
- [ ] Field count minimized
- [ ] Related lists limited
- [ ] Actions optimized
- [ ] Quick actions utilized
## Testing and Monitoring
### Level 1: Performance Testing
- [ ] Load testing completed
- [ ] Stress testing performed
- [ ] Volume testing done
- [ ] Endurance testing completed
- [ ] Spike testing performed
### Level 2: Monitoring Setup
- [ ] Event monitoring enabled
- [ ] Performance dashboards created
- [ ] Alert thresholds configured
- [ ] Custom metrics tracked
- [ ] Trend analysis automated
### Level 3: Optimization Tracking
- [ ] Baseline metrics captured
- [ ] Improvement targets set
- [ ] Progress tracked regularly
- [ ] ROI calculated
- [ ] Success criteria defined
## User Experience
### Level 1: Page Load Times
- [ ] Initial load < 3 seconds
- [ ] Subsequent loads < 1 second
- [ ] Search responses < 2 seconds
- [ ] Save operations < 2 seconds
- [ ] Navigation instant
### Level 2: Perceived Performance
- [ ] Loading indicators used
- [ ] Progressive disclosure implemented
- [ ] Optimistic UI updates
- [ ] Skeleton screens utilized
- [ ] Async operations for long tasks
## Documentation
### Level 1: Performance Documentation
- [ ] Bottlenecks documented
- [ ] Optimization decisions recorded
- [ ] Trade-offs explained
- [ ] Monitoring guide created
- [ ] Troubleshooting steps defined
### Level 2: Best Practices
- [ ] Coding standards updated
- [ ] Design patterns documented
- [ ] Anti-patterns identified
- [ ] Team training completed
- [ ] Knowledge sharing active
## Continuous Optimization
### Level 1: Regular Reviews
- [ ] Monthly performance reviews
- [ ] Quarterly deep dives
- [ ] Annual architecture review
- [ ] Continuous monitoring active
- [ ] Proactive optimization planned
### Level 2: Capacity Planning
- [ ] Growth projections analyzed
- [ ] Scaling strategies defined
- [ ] Resource planning completed
- [ ] Budget allocated
- [ ] Timeline established
## Sign-off
### Performance Acceptance
- [ ] Performance targets met
- [ ] User satisfaction confirmed
- [ ] Technical debt acceptable
- [ ] Monitoring in place
- [ ] Optimization plan approved