diff options
| author | Emīls <emils@mullvad.net> | 2026-01-22 00:31:38 +0100 |
|---|---|---|
| committer | Emīls <emils@mullvad.net> | 2026-01-22 00:31:38 +0100 |
| commit | fc3409a0f27272abf5ea14b0276b7a3728d2cf66 (patch) | |
| tree | 5b72c34c1f588620182d5d88a3a591d33db53140 | |
| parent | cbe69646edfefa68122e0c47cb57eecda7254889 (diff) | |
| download | mullvadvpn-fc3409a0f27272abf5ea14b0276b7a3728d2cf66.tar.xz mullvadvpn-fc3409a0f27272abf5ea14b0276b7a3728d2cf66.zip | |
Initialize the observable infra early
| -rw-r--r-- | ios/MullvadVPN/AppDelegate.swift | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index 177306d12e..5ce3c17f60 100644 --- a/ios/MullvadVPN/AppDelegate.swift +++ b/ios/MullvadVPN/AppDelegate.swift @@ -183,6 +183,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD startInitialization(application: application) + // Pre-warm @Observable infrastructure for LocationNode to avoid first-render lag + // in SelectLocationView. SwiftUI's observation system has initialization overhead + // that is cached after first use. + DispatchQueue.global(qos: .userInitiated).async { + _ = LocationNode(name: "", code: "") + } + return true } |
