Groups | Blog | Home
all groups > dotnet xml > october 2005 >

dotnet xml : System.OutOfMemoryException on Large Files)


Martin Honnen
10/5/2005 12:00:00 AM


[quoted text, click to view]


[quoted text, click to view]

If you are using XslCompiledTransform instead of XslTransform in .NET
2.0 then you should certainly see much better performance. Or are you
using XslTransform in .NET 1.1 and .NET 2.0 and then see much of a
performance difference?


[quoted text, click to view]

A workaround might depend on the stylesheet and the XML input and
finding more efficient ways to transform which could involve changing
the stylesheet, breaking up the input, breaking up the output.

--

Martin Honnen --- MVP XML
Mohd Banat
10/5/2005 2:47:02 AM
hello,

I get XXX when I run the following code (if and only if the outcome of
transformation is beyond 20 MB)

With _Xslt

.Load(XslFile)

.Transform(XmlDocument, Nothing, MyWriter, Nothing)

End With

If I run this in .NET 2.0 Beta 2, it gets on and it's much faster as well.
If run the same on MSXML 4.0, it's works and it's much faster too.

Is this a known issue in .NET 1.1 ? Is there a way around it? or do I have
to switch to MS XML 4.0 for now?

--
Mohammed Banat
Mohd Banat
10/5/2005 11:57:01 PM
Well,

first, by XXX I meant System.OutOfMemoryException (sorry).

second, I'm not xml/xsl/xslt guru, but I beleive that what we have is fairly
simple, and I'm not sure if it can be optimized. We're trying to generate
WordML out of some database queries. The output XML is WordML, and cannot be
chunked easily, I assume.

Is there anything that we can check? like an article on optimization (if
that's the way to go)?

How come .NET 2.0 and XML 4.0 has no problem?

--
Mohammed Banat



[quoted text, click to view]
v-kevy NO[at]SPAM online.microsoft.com
10/7/2005 6:21:43 AM
Hi Mohanmmed,

Is the Xml document very large and the XSL transformation comsumes a lot of
resource? Yes, as I know, the MSXML, .NET xml 1.1 and 2.0 has a lot of
difference. .NET xml 2.0 has a lot of optimizations than 1.1. And the
implementation of .NET xml and MSXML is totoally different. It's hard to
reproduce this error on my machine, even with a large xml doc. In this
case, I suggest you try to contact Microsoft PSS for this issue. If this is
really a bug, the service will be free of charge.

http://support.microsoft.com/default.aspx?scid=fh;EN-US;OfferProPhone

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
AddThis Social Bookmark Button