Ask a Question related to Macromedia ColdFusion, Design and Development.
-
samb1 #1
Performance issue
I have an array with around 40 different url values in it. Im trying to cfhttp
each URL in turn, and then parse the contents of each URL one by one. However
my code is running very slow, I understand this may be the nature of the beast
but can anyone tell me how I could improve my code to help manage the problem a
little better? Thanks, here is my code: P.S Im a CF beginner so be gentle :)
<cfhttp method='get' URL='http://localhost:8500/Project/template.xml'
ResolveURL='yes'></cfhttp> <cfset xmlString = cfhttp.fileContent /> <cfset
xmlObj = xmlParse( xmlString ) /> <!---Loop through the XML doc
elements---> <cfloop from='1' to='#arrayLen( xmlObj.xmlRoot.xmlChildren )#'
index='i'> <!---HTTP Call each site index attribute from the XML--->
<cfhttp method='get' URL='#Trim(xmlObj.xmlRoot.site.xmlAttributes.index )#'
ResolveURL='yes'></cfhttp> <cfset StartPos = 1> <cfloop condition
='True'> <!---Parse the site index pages for job links---> <cfset
Match = REFindNoCase(#Trim(xmlObj.xmlRoot.site.parse.xmlAt tributes.re)#,
cfhttp.FileContent, StartPos, True)> <cfif Match.pos[1] EQ 0>
<cfbreak> <cfelse> <cfset StartPos = Match.pos[1] +
Match.len[1]> <!---<cfset Foundlinks = Mid(cfhttp.FileContent,
Match.pos[1], Match.len[1])>---> <cfset StripLinks =
#REReplaceNoCase(#Mid(cfhttp.FileContent, Match.pos[1],
Match.len[1])#,'\s*HREF=\W', '', 'ALL')#> <!---Store the list of
FoundLinks into the Links Array---> <CFSET LinksArray = ArrayNew(1)>
<CFSET counter = 1> <cfloop index='idx' list='#StripLinks#'>
<cfhttp url='#idx#' method='GET' resolveurl='false'></CFHTTP> <CFSET
LinksArray[counter] = CFHTTP.FileContent> <CFSET counter = counter + 1>
</CFLOOP> <cfdump var='#LinksArray#'> </cfif> </cfloop>
<!---#xmlObj.xmlRoot.site.parse['detail-page-parsers'].xmlAttributes.re#</p>--->
</cfloop>
samb1 Guest
-
Performance issue when cfc is called as web service
Hello, We are using Coldfusion MX 7 on a Windows 2003 server SP2, 3Gigs RAM, 4 CPUs (2 dual core), SUN JVM 1.4.2_11, Min & Max JVM Heap sizes =... -
IsInRole Performance Issue
Hi, We have a very large AD here and I am noticing that the WindowsPrinciple IsInRole function is taking upwards of 1 second to respond with just a... -
CFMail - performance issue
Hi, I have developed a discussion board on which users can subscribe to particular topics. Subscribed users receive an email (with link back to... -
7.x to 9.x Performance issue in the extreme
Greetings, The problem: I run an identical program on Server A and Server B. On Server A the program runs in 12 seconds. On Server B it takes 1.5... -
Performance Issue using SQLJ
Hi. We're looking at using SQLJ to see how we could incorporate it into our environment and achieve better throughput and cost savings over using... -
Mr Black #2
Re: Performance issue
You might be just waiting on all those URL. Query all of them at once:
[url]http://www.cftagstore.com/tags/cfxhttp5.cfm[/url]
Mr Black Guest
-
BasFMS #3
Performance issue
Hi,
im currently developing a video chat application, thats needs to be able to
handle hundreds of incoming and outgoing video and data streams. I have a 150
connections limit license, and thats fine for now. My application succesfully
handles hundreds of data (sharedobjects,remoting etc) routines but when it
comes to streaming video, the server seems to have difficulties keeping up.
When i launch 1 upload stream and connect 100+ external clients to FMS to view
this stream the cpu usage quickly rises above 50%. Tweaking the bandwith
settings of the clients (in the FMS application) and the cam settings of the
upload client do not result in a spectecular performance boost. Only the total
amount of bandwith used drops, and thats makes perfect sense.
Is serving up to 100+ video streams on 1 machine too much or am i overlooking
something obvious?
the server :
Dual Intel(R) Xeon(TM) CPU 2.40GHz with 1gb of Ram.
Thanks.
BasFMS Guest



Reply With Quote

