Research

Digital Surface Labs

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.WhenAll for ~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
  • @Observable migration 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.async calls should use @MainActor for better compiler checking
  • Example: AirTalkConversationsManager.swift line 473
  • 16 MainActor concurrency warnings were already fixed on Feb 13 (branch: jn/refactor/fixMainActor)

Backend 3.x -- OData Query Performance (Legacy)

  • Complex $expand queries cause unpredictable performance/timeouts
  • EF6 tracking overhead with large object graphs
  • Mitigation: Being phased out via migration to 4.x REST API
  1. Consolidate analytics SDKs -- Biggest bang-for-buck on frontend startup and memory
  2. Complete async/await migration -- Improves code quality AND performance
  3. Briefing packet lazy loading -- User-facing performance improvement
  4. @Observable macro migration -- Reduces unnecessary SwiftUI re-renders
  5. Image caching layer -- Reduces network overhead
  6. 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