c# - XsltCompiledTransform is slow on first Transform - Undocumented behaviour -


we have relatively complex xslt file.

.net version 3.5 - mvc 2 app running in iis7.5

when xsltcompiledtransform.transform, first time takes 1 minute. subsequent times takes less second regardless of input xml looks like.

the initial transform stackoverflowexception if don't put in new thread, in new thread. xsltcompiledtransform object static object, don't recreate every time transform.

this behaviour not documented anywhere in msdn far know. documentation states compile xslt using xsltc.exe (we did this) doesn't spend lot of time compiling xslt when call load method it's compiled. unfortunately, didn't increase performance when called load, , regardless of if load xslt text or assembly, first transform takes 1 minute, , subsequent transforms lightning fast.

unfortunately, requiring "dummy" transform on simple piece of xml text @ startup, first user not experience 1 minute delay transformation.

the transformations large pieces of xml, doesn't have impact on transform time. if xml 1,500kb (typical) or less 1kb (as in our dummy transform has single xml tag) takes 1 minute first transform.

has experienced this? ideas on how resolve this seems undocumented behaviour.

check whether there traffic web sites, in particular fetching of dtds or similar files w3c web site - deliberately "throttle" these requests encourage people maintain local copies.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -