Do you get out of mem on cffile without the xml processing?

Calvin

-----Original Message-----
From:  Rob
Date:  6/14/04 10:35 am
To:  CF-Talk
Subj:  RE: Out of Memory Error Transforming large XML file.

On Mon, 2004-06-14 at 07:17, Dave Watts wrote:
> > With Robs help, I can transform a small test xml file that
> > represents part of the iTunes library xml file.
> >
> > When I try to transform the actual (3.7 meg) file, the
> > program fails with :
> >
> > "Error","jrpp-144","06/14/04","05:24:54",," The specific
> > sequence of files included or processed is:  
> > /Applications/JRun4/servers/cfmx61flex/cfusion/myMusic/
> > TransformPlaylists.cfm "
> > java.lang.OutOfMemoryError
> >
> > Here's the code:
> >
> > <cfset path = getDirectoryFromPath(getCurrentTemplatePath())/>
> > <cfset path1 = "/Users/richard/Music/iTunes/iTunes Music
> > Library.xml"/> <cffile action="" file="#path1#"
> > variable="myxml"> <cfset mydoc = XmlParse(myxml)>
> >
> > <cffile action="" file="#path#playlists.xsl" variable="xslDoc">
> >
> > <cfset transformedXML = XmlTransform(mydoc, xslDoc)>
> >
> > <cfoutput>#transformedXML#</cfoutput>
> >
> > Is this a bug? .... A limitation?... a Feature?
>
> That's a lot of data to output to a browser. Where exactly is it failing? On
> the CFFILE, the XmlTransform function, or the CFOUTPUT

BAM! Crashing servers since 1999 :-D - I'd bet its the DOM - I think
cfmx likes to make DOMs out of xml and that means a grip of memory.
Tonight I'll modify the sheet to only do 1 list, but I think it might be

3.9 Megs
<cffile action="" file="#path1#" variable="myxml">

+3.9 Megs times about 3 (for the in memory tree)
<cfset mydoc = XmlParse(myxml)>

Don't know if that is SAX or not, so it could be another
+XX Megs for the result tree
<cfset transformedXML = XmlTransform(mydoc, xslDoc)>

We'll play tonight

Cheers,
--
Rob <[EMAIL PROTECTED]>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to