summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2026-01-22 00:31:38 +0100
committerEmīls <emils@mullvad.net>2026-01-22 00:31:38 +0100
commitfc3409a0f27272abf5ea14b0276b7a3728d2cf66 (patch)
tree5b72c34c1f588620182d5d88a3a591d33db53140
parentcbe69646edfefa68122e0c47cb57eecda7254889 (diff)
downloadmullvadvpn-fc3409a0f27272abf5ea14b0276b7a3728d2cf66.tar.xz
mullvadvpn-fc3409a0f27272abf5ea14b0276b7a3728d2cf66.zip
Initialize the observable infra early
-rw-r--r--ios/MullvadVPN/AppDelegate.swift7
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
}