This patch is to avoid JIT compilation of the following methods on
setEnvironmentVariable() at launch time. These methods are not
subject to AOT compilation even if the system assemblies are fully-
NGENed and IBC-optimized.
- System.SpanHelpers:IndexOf(byref,ubyte,int)
- System.SpanHelpers:Contains(byref,ushort,int)
if (!standalone)
{
- preloadTypes(); // Preload common managed code
+ // Preload common managed code.
+ preloadTypes();
+
+ // This redundant call effectively reduces JIT overhead at launch time.
+ setEnvironmentVariable("XDG_DATA_HOME", "/");
}
_INFO("CoreRuntime initialize success");