Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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 =...
    2. 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...
    3. 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...
    4. 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...
    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...
  3. #2

    Default 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

  4. #3

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139