Reduce JIT and type load overhead in WinForms startup (dotnet/corefx#39315)
https://github.com/dotnet/corefx/pull/37853#discussion_r300974699
The existing code was trading startup perf for throughput in a codepath that is unlikely to be executed commonly. The common scenario is that the `UserPreferencesChanging` event is not fired for the entire lifetime of the app (I left an app listening for this event running for an hour of normal work and never once was the event fired. I then changed system colors to force it).
To set up the high performance path, we have to load two unique `Func` instantiations and JIT a generic method. It's likely the throughput optimization won't pay for itself in terms of CPU cycles even if someone does change quite a few settings.
Commit migrated from https://github.com/dotnet/corefx/commit/
3c37204d825c567ead19d8b2d9513efca25dd7c8