Skip to content

fix: prevent app hang from synchronous font loading - #11

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/app-hang-font-loading
Open

fix: prevent app hang from synchronous font loading#11
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/app-hang-font-loading

Conversation

@sentry

@sentry sentry Bot commented Aug 4, 2026

Copy link
Copy Markdown

This PR addresses an app hang (at least 2000 ms) caused by repeated synchronous loading and parsing of WOFF2 fonts on the main thread. Previously, OpenNOWNVIDIAFont.loadDescriptor(named:) was called on every font access, leading to performance issues during SwiftUI view layouts.

The fix introduces static let properties for CTFontDescriptor instances within OpenNOWNVIDIAFont. This ensures that each font weight's descriptor is loaded and parsed from disk only once, on its first access. Subsequent requests for the same font weight will retrieve the cached descriptor, eliminating redundant disk I/O and main thread blocking.

Fixes OPENNOW-MAC-21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants