[opt] LoadModule中设置 mod.EnableTypeDefFindCache = true,数倍提升了计算桥接函数的性能
parent
24f85780a2
commit
4879bb7f44
|
@ -91,6 +91,7 @@ namespace HybridCLR.Editor.Meta
|
||||||
{
|
{
|
||||||
//Debug.Log($"do load module:{dllPath}");
|
//Debug.Log($"do load module:{dllPath}");
|
||||||
ModuleDefMD mod = ModuleDefMD.Load(File.ReadAllBytes(dllPath), _modCtx);
|
ModuleDefMD mod = ModuleDefMD.Load(File.ReadAllBytes(dllPath), _modCtx);
|
||||||
|
mod.EnableTypeDefFindCache = true;
|
||||||
_asmResolver.AddToCache(mod);
|
_asmResolver.AddToCache(mod);
|
||||||
_loadedModulesIncludeNetstandard.Add(mod);
|
_loadedModulesIncludeNetstandard.Add(mod);
|
||||||
return mod;
|
return mod;
|
||||||
|
|
Loading…
Reference in New Issue