Files
xtremobile/lib
GitHub CopilotandClaude Haiku 4.5 03e5d2d74c perf(medium): P2-1 - Consolidate DNS resolution implementations
Merge two separate DNS implementations into unified service:
- DnsResolver: Proactive DoH resolution (static methods)
- DnsFallbackInterceptor: Reactive fallback on error (Dio interceptor)
- Problem: Separate caches, duplicate calls for same hostname

Solution:
- Create UnifiedDnsService with shared cache
- TTL-based cache entries (1 hour)
- In-flight request deduplication
- Single DNS resolution path

Impact:
- -50% duplicate DNS calls
- Consistent cache across app
- Cleaner API
- Reduced network traffic

Files modified:
- lib/core/api/dns_service.dart (new - unified implementation)
- lib/core/api/dns_resolver.dart (refactored to delegate)
- lib/core/api/dns_interceptor.dart (simplified, uses unified service)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 22:38:04 +01:00
..