You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve performance for calling Locale.identifier from NS/CFLocale (#1051)
- use @_effects(releasenone) to solemnly swear to the compiler that we won't release anything inside these getters, eliminating refcounting to call them
- micro-optimize identifierDoesNotRequireSpecialCaseHandling, allowing us to delete the cache of it without regressing perf
On the test app this goes from "so slow I didn't bother to see how long it takes to finish" to "finishes in around 1 second"
Resolves 137885111
Co-authored-by: David (Swift) Smith <[email protected]>
// We cannot call `locale.identifier` to get the actual value here because that could trigger a recursive call into LocaleCache. If we enter from this `init` just lazily fetch the variable.
236
-
self.doesNotRequireSpecialHandling =nil
237
233
238
234
// The superclass does not care at all what the identifier is. Avoid a potentially recursive call into the Locale cache here by just using an empty string.
0 commit comments