very quick.
If anyone wants it, let me know and I'll mail it off list.
Craig.
-----Original Message-----
From: Snake Hollywood [mailto:[EMAIL PROTECTED]
Sent: 05 October 2003 12:20
To: CF-Talk
Subject: RE: Can this be optimized?
Have SQL server do it directly with a scheduled DTS and it will
be even
quicker.
-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: 05 October 2003 05:21
To: CF-Talk
Subject: RE: Can this be optimized?
stace.
i just had to do the same, i have some reports that clients run
every 30 days, its about 1000+ lines in a csv, i *USED* to have
it
write cffile appends' for each iteration. HAH, silly me.
i use cfsetting enablecfoutput and cfsavcontent to
dump
all the lines in 1 var, then write at once. NOW, from 21 min.
down to
25-31 seconds, for about 1000 lines, to csv, then emailed, the
whole
thing, out of a 19000000 line database, the loop, inside
cfsavecontent
and then dump once, wow what a difference!
tony
-----Original Message-----
From: Stacy Young [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 04, 2003 12:22 PM
To: CF-Talk
Subject: RE: Can this be optimized?
I owe u a cold one for that...50% less memory usage. :-)
In the case where I'm emailing a CSV, I don't imagine there's
much I can
do...(hope I'm wrong)
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<cfsavecontent variable="request.filecontent">
<cfoutput>#title##chr(10)##chr(10)##getData.columnlist##chr(10)#</cfoutp
ut>
<cfloop query="results">
<cfset x = 0>
<cfloop
list="#results.ColumnList#"
index="column">
<cfset x = x +
1>
<cfoutput>"#Replace(
Evaluate( column ) , '"' , ' ' , 'ALL' )#"<cfif x NEQ ListLen(
results.ColumnList )>,</cfif></cfoutput>
</cfloop>
<cfoutput>#chr(10)#</cfoutput>
</cfloop>
</cfsavecontent>
</cfsetting>
<cffile action="" file="#filepath#"
output="#request.filecontent#"
addnewline="Yes">
I originally had it looping over CFFILE but it was painfully
slow...I
guess with the large number of file I/O's...this one stores in
request
and makes single cffile dump at the end.
Stace
_____
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
Sent: October 4, 2003 12:05 PM
To: CF-Talk
Subject: Re: Can this be optimized?
Stacy Young wrote:
>
> It's not often I nitpick in the sake of 'supreme optimization'
but in
> this case it's necessary. I'm using the following code snippet
to
> generate CSV file for different queries. The process is
usually quite
> memory intensive, wondering if anyone with fresh pair of eyes
can
point
> out any items that can be done differently. Speed is not so
much an
> issue, it's quite fast...but for larger recordsets it eats
mega RAM.
Have you tried using cfflush?
Jochem
_____
_____
_____
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

