Jetpack Performance Improvements
JetPack Performance Improvements
Research compiled: 2026-02-16 Sources: workspace summaries, code-quality-bot analysis, codebase review
Current Performance Wins (Already Implemented)
Backend 4.x -- Task.WhenAll Parallel Processing
- FlightPlanService uses
Task.WhenAllfor ~10 concurrent DB queries - Result: 70%+ response time reduction for flight plan loading
- This is the single biggest performance optimization in the system
Backend 4.x -- Resilience Patterns
- Polly policies: retry, circuit breaker, timeout
- Connection pooling for database access
- Async operations throughout
- Database indexing on critical query paths
Backend 4.x -- Memory Caching
- In-memory caching for frequently accessed data
- Reduces database round-trips for static/semi-static data
Deployment -- Multi-Region Active-Active
- SQL geo-replication across regions
- APIM health checks for failover
- App Service autoscaling
Identified Improvement Opportunities
Frontend -- Analytics SDK Overhead (MEDIUM Impact)
- 4 analytics SDKs running simultaneously: Firebase (v11.6.0), AppDynamics (v2025.2.0), Pendo (v3.8.3), New Relic (v7.5.4)
- Each adds startup time, memory overhead, background network calls
- Recommendation: Consolidate to 1-2 SDKs. Firebase + one APM tool should suffice.
Frontend -- Lazy Loading for Briefing Packets
- Briefing packets can be large PDFs
- Lazy loading would improve tab-switching performance
- Currently loads eagerly on flight selection
Frontend -- Image Caching
- Flight-related imagery (weather maps, etc.) could benefit from proper caching
- Reduce re-downloads on tab switches
Frontend -- Background Task Optimization
- Push notification handling and data sync could be optimized
- Currently may over-fetch on push events
Frontend -- SwiftUI Re-render Reduction
- Some views may trigger unnecessary re-renders from state changes
@Observablemigration would help (see modernization items)
Frontend -- Modernize WebServiceProxy (MEDIUM Impact)
- File:
MobileOpsPilotApp/WebServiceProxy.swift - GET (lines 15-113) and POST (lines 116-216) use completion handler pattern
- 225 completion handlers vs 169 async/await calls in codebase
- Migrating to async/await improves error handling and eliminates callback overhead
Frontend -- @MainActor Migration
DispatchQueue.main.asynccalls should use@MainActorfor better compiler checking- Example:
AirTalkConversationsManager.swiftline 473 - 16 MainActor concurrency warnings were already fixed on Feb 13 (branch:
jn/refactor/fixMainActor)
Backend 3.x -- OData Query Performance (Legacy)
- Complex
$expandqueries cause unpredictable performance/timeouts - EF6 tracking overhead with large object graphs
- Mitigation: Being phased out via migration to 4.x REST API
Recommended Priority Order
- Consolidate analytics SDKs -- Biggest bang-for-buck on frontend startup and memory
- Complete async/await migration -- Improves code quality AND performance
- Briefing packet lazy loading -- User-facing performance improvement
- @Observable macro migration -- Reduces unnecessary SwiftUI re-renders
- Image caching layer -- Reduces network overhead
- Accelerate 3.x backend decommission -- Eliminates OData performance problems
Backend Future Roadmap (from summaries)
| Improvement | Impact | Effort |
|---|---|---|
| Redis distributed caching | High | Medium |
| Microservices split | High | High |
| Proper API versioning | Medium | Low |
| GraphQL API | Medium | High |