fastest in-memory cache for XslCompiledTransform

不想你离开。 提交于 2019-12-06 04:40:42

After the successful execution of Load() on an instance of XslCompiledTransform, this instance can be cached in order to achieve better performance.

Do remember that Load() is a very expensive operation.

Instead of compiling and caching XSL transforms at run time you can use the MS SDK tool xsltc.exe (XSL compiler) to generate assemblies.

At runtime your application will then either load these assemblies dynamically (or you can just add static references to your application) and call the overloaded XslCompiledTransform.Load( System.Type type) method to load the type that you compiled into the XSL assembly.

This is the absolute fastest way since you dont incur the compile penalty of runtime - only at build/compile time.

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