views:

53

answers:

2

Is there any way you can speed up XSL transformations? I am using the XSLCompiledTransform class to transform my XML files. My XML files contain around 3900 records with roughly 100 fields within each record. The transformation file for this is around 10 KB in size.

It takes about 25 - 30 minutes before I see the transformed file.

I am not sure if this is a factor of number of elements, memory capacity on my pc, the fact that I am on a 32 bit OS.

Does anyone know of any techniques that can speed up this transformation process?

A: 

Since you did not show us any of your code, I can give you only a very general advice: try another XSLT processor. xsltproc is very fast, look at http://xmlsoft.org/XSLT/xsltproc2.html, Windows binaries are here.

Doc Brown
@Doc Brown: It's like saying so someone who uses PHP and finds his app too slow that he may use ASP.NET instead. I think the first thing to know if whether the bottleneck is .NET XSLT engine. There are chances that the slowness come from poorly-written XSLT or other missed optimizations.
MainMa
@MainMa: yes, the chances are high. But trying a different xslt processor might be worth trying, since trying this can often be achieved with very small effort, XSLT is very portable to my experience. Your PHP -> ASP.NET comparison is pointless, that would mean a complete change of programming language, which is not the case here.
Doc Brown
@Doc Brown: I agree.
MainMa
A: 

See the answers on a related question:

How do I profile and optimize an XSLT?

0xA3