From 226b19ae4327bbd4621e2eb25470b02df1e5e933 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 14 Jan 2026 22:22:26 +0200 Subject: [PATCH] Reduce startup hang by not querying fonts (#9670) * query fonts lazily * use `lazy var` --- patches/expo-font+14.0.10.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 patches/expo-font+14.0.10.patch diff --git a/patches/expo-font+14.0.10.patch b/patches/expo-font+14.0.10.patch new file mode 100644 index 0000000000..ac7526e23d --- /dev/null +++ b/patches/expo-font+14.0.10.patch @@ -0,0 +1,16 @@ +diff --git a/node_modules/expo-font/ios/FontLoaderModule.swift b/node_modules/expo-font/ios/FontLoaderModule.swift +index 183480f..7b64f6e 100644 +--- a/node_modules/expo-font/ios/FontLoaderModule.swift ++++ b/node_modules/expo-font/ios/FontLoaderModule.swift +@@ -2,10 +2,9 @@ import ExpoModulesCore + + public final class FontLoaderModule: Module { + // could be a Set, but to be able to pass to JS we keep it as an array +- private var registeredFonts: [String] ++ private lazy var registeredFonts: [String] = queryCustomNativeFonts() + + public required init(appContext: AppContext) { +- self.registeredFonts = queryCustomNativeFonts() + super.init(appContext: appContext) + } +