Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
jamest827 #1
Efficiency of string processing
Hello,
I'm doing some fairly heavy-duty text processing under CF 5.0 and 4.5, and
processing speed has become a major issue.
A prime example is that a simple Replace() function call will take a full 2
*minutes* of CPU time on the server. This is with a subject string that I've
read in from a file, which in this case is about 900K in size. Here's the
code, which simply joins lines that have an equals-sign continuation character.
<cfset newDoc = Replace(theDoc, "=" & chr(13) & chr(10), "", "ALL")>
Sure, 900K is a long string, but I wrote a short perl program that does the
same replacement on the same data, and it executed in about 0.03 seconds, or
4000 times faster, with verified matching results.
The rest of the processing is a mix of REFind() scans, string subsectioning
using RemoveChars(), Mid(), etc, and lots of concatenation. I haven't
identified other individual operations that are as slow as Replace(), but the
overall CPU time requirements are still much higher than I'd liike.
I suspect I'll need to go outside of CF to do this processing, but wondered if
there might be any CF techniques or tunable parameters that could help.
Thanks,
James
jamest827 Guest
-
Web Site Efficiency
Hope i'm in the right group. I'm developing a small non-commercial website to run on windows 2000 pro with IIS. How many simultaneous users (approx)... -
newbie mod_perl efficiency
Hello All, I'm a newbie, and this may be a stupid question, but I haven't been able to find clear help for this: Building a CGI-based site... -
Efficiency question
I am writing an SQL statement to display the most recent articles posted into a database. I know that I can specify the max rows and use "order by... -
Database Efficiency
What is the most efficient way to build an extract database? Specifically, I want to read, via ODBC, one non-MS-Access database table with dozens... -
Marshal efficiency
Folks, As an intermediate step in a small software system that performs a large amount of data gathering, I am using Marshal to store processed...



Reply With Quote

