On 10/11/07, Brian Kotek <[EMAIL PROTECTED]> wrote:
> Also, I am almost positive that Replace() is creating another string
> variable under the hood, which means in this nested loop that could be a
> huge number of new CF string variables, depending on how many iterations
> you're doing.
>
> <cfset fileOutput.append
> (replace(START_FIELD,"___COLNAME___",ThisCol,"ALL"))>

That's a good point!   I use the StringBuffer method to avoid that!

But... imagine, 50,000 rows, 200 columns.  That's 10,000,000
iterations of this particular operation.

I haven't run this yet, but I'm going to try it.. what I've done is
created a struct called start_fields which is populated BEFORE the
output of the columns..

So the above line is now:

<cfset fileOutput.append(START_FIELDS[ThisCol])>

START_FIELD contained <td class="___COLNAME___">

But START_FIELDS["ENTITYID"] now contains <td class="ENTITYID">

I'll give this a whirl and see what happens.

I'll try the setLength() thing that Mark suggested too.

-- 
Rick Root
Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
www.opensourcecf.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290923
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to