Compiled Expression Tree slow due to JIT_MethodAccessCheck

戏子无情 提交于 2019-12-04 12:57:13

JIT_MethodAccessCheck method performs security checks such as SecurityTransparent, APTCA and class access checks as mentioned by @xanatos.

Class access checks include SecurityCritical, SecuritySafeCritical, attached profiler bypass and LinkDemand. More details can be found at coreclr jithelpers.cpp.

Since coreclr is compatible with CLR, we can safely assume that the checks are in the same manner in both of them.

Use the code snippet in this answer to compile expression trees instead, it gets rid of the checks across method boundaries:

Why is JIT_MethodAccessAllowedBySecurity taking so much time?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!