[libs][Unix][perf] Lazily initialize TimeZoneInfo names and order GetSystemTimeZones...
authorMitchell Hwang <16830051+mdh1418@users.noreply.github.com>
Mon, 10 Jul 2023 14:07:01 +0000 (10:07 -0400)
committerGitHub <noreply@github.com>
Mon, 10 Jul 2023 14:07:01 +0000 (10:07 -0400)
commita772aa3b4593ceed36b9ff21d5fe8e8a9656f74d
tree89866d6daf19d166367e93480b4307c90e5fb639
parentfc3e4034b9e1f239b5131afa8ee50b4f63b16550
[libs][Unix][perf] Lazily initialize TimeZoneInfo names and order GetSystemTimeZones by Ids (#88368)

* [libs] Remove unnecessary assignment TZifHead

* [libs][perf] Add lazy initialization for TimeZoneInfo names

* Reduce comparisons for UTC alias and remove static array allocation

* [libs] Lazy init display names for utc aliases

* [libs][perf] Order system time zones by id

* Directly compare numerical value

* Fix internal field naming

* Remove TryPopulateTimeZoneDisplayNamesFromGlobalizationData

* Make lazy initialization methods static on windows

* Revert "[libs][perf] Order system time zones by id"

This reverts commit 580a765775693a2e8f5de81a46591c8a94890088.

* Fix lazy initialization for Minimal Globalization Data

* Avoid lazy initialization where internal display name fields are set to null

* Fix CreateLocal not preserving lazy initialized names

* Prevent unintended lazy initialization in CreateCustomTimeZone

* Make UICulture a property

* Substitute null name properties with empty string in default constructor

* Assert not reached in Invariant mode
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.Unix.cs
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.MinimalGlobalizationData.cs
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.cs