Read in the file... Then convert the data into a Java string:

<cfset jstrFileData = CreateObject( "java", "java.lang.String" ).Init(
strFileData ) />

Java strings are MUCH faster and MUCH more powerful in terms of regular
expressions you might need. 

You can even split the java string into an array based on lines using the
Java String::Split() method which takes a regular expression.

Or you can create a Java file reader and read in a line at a time which
should make it less RAM-intensive as you stream in the file (I think). 

I don't really have any examples off hand, but Java is pretty lean and mean.

.......................
Ben Nadel 
www.bennadel.com

-----Original Message-----
From: Robert Everland III [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 12:40 PM
To: CF-Talk
Subject: Parsing a file

I know this has been asked before, but I can't seem to find this in the
archives.

I have a file that I am doing a ton of parsing on. It's has fake encryption
(basically obsfucation) and I am doing a ton of listgets and going through
each line and putting it into a structure. The thing is it's only a 1.7mb
file, but it's bringing my pretty beefy server to its knees. DTS and
Microsoft SQL server and even sql_loader for Oracle is not an option as I am
basically decrypting this file. Anyone have any ideas on what i can do to
make this process leaner?



Bob



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249209
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