c# - What's the correct way to use XslCompiledTransform? -
unfortunately, i'm working on website uses xsl everything. performance dire. time spent in jit 30%!
i put fact company needs 4 servers run little sites down xsl, i'm doing proper perf review , although xsl totally culprit, suspect xsl isn't supposed bad, original programmers (who javascript guys) misused xslcompiledtransform type.
problem is, i'm no better able use api myself. class renewed .net 2.0 compilation caching included. have spent day trying work out under circumstances caching works; code newed-up xslcompiledtransform each transformation, didn't seem right making static doesn't - performance profiling shows no improvement.
further, in debugger output pane, can see loaded 'system.xml.xsl.compiledquery.5' popping same stylesheet, looks compiling, loading again each time.
it's occurred me maybe i'm supposed caching, i.e. i'm supposed keep store 1 of these xslcompiledtransform instances each stylesheet, preloaded or lazy-loaded.
is right?? keeping 1 instance , calling load many times each stylesheet incorrect?
compiling stylesheet takes longer running it. should compile stylesheet once, , reuse compiledstylesheet object run each transformation.
(thanks john nicholas recommendation use saxon, , heartily endorse that, it's not relevant problem, since saxon api can misused easily.)
Comments
Post a Comment