[opt] LoadModule中设置 mod.EnableTypeDefFindCache = true,数倍提升了计算桥接函数的性能

main
walon 2024-04-03 11:09:04 +08:00
parent 24f85780a2
commit 4879bb7f44
1 changed files with 1 additions and 0 deletions

View File

@ -91,6 +91,7 @@ namespace HybridCLR.Editor.Meta
{
//Debug.Log($"do load module:{dllPath}");
ModuleDefMD mod = ModuleDefMD.Load(File.ReadAllBytes(dllPath), _modCtx);
mod.EnableTypeDefFindCache = true;
_asmResolver.AddToCache(mod);
_loadedModulesIncludeNetstandard.Add(mod);
return mod;