<cfloop> itself isn't bad.

You're just doing a lot of work in a single thread. I.e. you have a selfish
thread.

I guess the question is what is this doing in that thread that is so
important, and can it be optimised.

Is it the only place that causes the CPU to spike?

Mark



On Tue, Feb 2, 2010 at 12:44 PM, Andrew Myers <am2...@gmail.com> wrote:

> Update:
>
> This page generates a report from a query that itself takes about 29
> seconds (and I am not sure I can do a lot to improve that without getting
> some cooperation from the guys who write the product I query out of, and
> that isn't likely to happen quickly).
>
> I've been caching the page with a "roll your own" custom tag.  The tag
> checks a timestamp on the database and forces a regeneration whenever it is
> necessary (it will change no more frequently than every 15 mins).
>
> What appears to be burning up the CPU is a fair bit of nested "cfloop'ing"
> that's happening in the page.  FR reports a heavy ColdFusion hit on the CPU
> of my laptop when I run this page and nothing else at all is happening.
>
> Some thoughts: I can try and generate these reports via a batch job and
> only make them available to the user once they're finalised.  This might
> stop requests queuing while the page generates?  The fact that it seems to
> chew CPU even when it's running in isolation seems to tell me it could be a
> waste of time though.
>
> Which leads me to the next thought - does CF loop just really suck?  I have
> replaced it with a cfoutput in one part that I can easily do so and it seems
> to have improved it slightly.  I may well end up having to do a complete
> rework I think.
>
> And that's assuming this is the only problem, and I doubt it is...
>
>
> On 2 February 2010 12:09, Andrew Myers <am2...@gmail.com> wrote:
>
>> Thanks again Guys.
>>
>> I've just watching the FR graphs and I noticed a big 100% spike at 11:54
>> which coincided with a long running request.  I think I will investigate
>> this some more...
>>
>> Andrew.
>>
>>
>>
>>
>> On 2 February 2010 11:52, Kai Koenig <k...@koeni.de> wrote:
>>
>>> I think it's jrpp (JRun Proxy Port) - that'd be the case if you're using
>>> the HTTP-Server
>>> connector. IF you're using the internal HTTP server, the threads have a
>>> different identifier
>>> prefix iirc.
>>>
>>> Cheers
>>> Kai
>>>
>>>
>>> Yup, that's the stuff.
>>>
>>> You're looking for threads name jppr* (If I remember correctly), they
>>> will show you what CF is doing.
>>>
>>> Mark
>>>
>>> On Tue, Feb 2, 2010 at 11:12 AM, Andrew Myers <am2...@gmail.com> wrote:
>>>
>>>> Is this what you guys all mean by the thread dumps?  I got this from
>>>> Resources -> List All Threads -> Stack Trace All
>>>>
>>>>
>>>> --------------------------------------------------------------------------------
>>>> Thread Stack TraceTrace Time:   10:46:20.870 02-Feb-2010Thread ID:
>>>> jms-fifo-1Priority:     5Hashcode:     9107243"jms-fifo-1" prio=5
>>>> tid=0x00992fc0 nid=0x13 in Object.wait() [0xa6d01000..0xa6d019c0]
>>>>        at java.lang.Object.wait(Native Method)
>>>>        - waiting on <0xbea19fd0> (a jrun.jms.core.threads.FIFOQueue)
>>>>        at java.lang.Object.wait(Object.java:429)
>>>>        at
>>>> jrun.jms.core.threads.FIFOQueue.queueHasElements(FIFOQueue.java:45)
>>>>        at jrun.jms.core.threads.FIFOQueue.get(FIFOQueue.java:65)
>>>>        - locked <0xbea19fd0> (a jrun.jms.core.threads.FIFOQueue)
>>>>        at
>>>> jrun.jms.core.threads.ThreadPoolWorker.runWorker(ThreadPoolWorker.java:91)
>>>>        at
>>>> jrun.jms.core.threads.ThreadPoolWorker$1.run(ThreadPoolWorker.java:49)
>>>>        at java.lang.Thread.run(Thread.java:534)
>>>>
>>>>  
>>>> --------------------------------------------------------------------------------
>>>> Thread Stack TraceTrace Time:   10:46:20.877 02-Feb-2010Thread ID:
>>>> jms-fifo-2Priority:     5Hashcode:     23671183"jms-fifo-2" prio=5
>>>> tid=0x008ff8f8 nid=0x14 in Object.wait() [0xa6c01000..0xa6c019c0]
>>>>        at java.lang.Object.wait(Native Method)
>>>>        - waiting on <0xbea1a310> (a jrun.jms.core.threads.FIFOQueue)
>>>>        at java.lang.Object.wait(Object.java:429)
>>>>        at
>>>> jrun.jms.core.threads.FIFOQueue.queueHasElements(FIFOQueue.java:45)
>>>>        at jrun.jms.core.threads.FIFOQueue.get(FIFOQueue.java:65)
>>>>        - locked <0xbea1a310> (a jrun.jms.core.threads.FIFOQueue)
>>>>        at
>>>> jrun.jms.core.threads.ThreadPoolWorker.runWorker(ThreadPoolWorker.java:91)
>>>>        at
>>>> jrun.jms.core.threads.ThreadPoolWorker$1.run(ThreadPoolWorker.java:49)
>>>>        at java.lang.Thread.run(Thread.java:534)
>>>>
>>>>  
>>>> --------------------------------------------------------------------------------
>>>> Thread Stack TraceTrace Time:   10:46:20.884 02-Feb-2010Thread ID:
>>>> jms-fifo-3Priority:     5Hashcode:     20239679"jms-fifo-3" prio=5
>>>> tid=0x0065bfa0 nid=0x15 in Object.wait() [0xa6b01000..0xa6b019c0]
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "cfaussie" group.
>>>> To post to this group, send email to cfaus...@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> cfaussie+unsubscr...@googlegroups.com<cfaussie%2bunsubscr...@googlegroups.com>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/cfaussie?hl=en.
>>>>
>>>>
>>>
>>>
>>> --
>>> E: mark.man...@gmail.com
>>> T: http://www.twitter.com/neurotic
>>> W: www.compoundtheory.com
>>>
>>> Hands-on ColdFusion ORM Training @ cf.Objective() 2010
>>> www.ColdFusionOrmTraining.com/
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "cfaussie" group.
>>> To post to this group, send email to cfaus...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> cfaussie+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/cfaussie?hl=en.
>>>
>>>
>>>   _________________________________________________
>>> Kai Koenig - Ventego Creative Ltd
>>> ph: +64 4 476 6781 - mob: +64 21 928 365 /  +61 450 132 117
>>> web: http://www.ventego-creative.co.nz
>>> blog: http://www.bloginblack.de
>>> twitter: http://www.twitter.com/agentK
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "cfaussie" group.
>>> To post to this group, send email to cfaus...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> cfaussie+unsubscr...@googlegroups.com<cfaussie%2bunsubscr...@googlegroups.com>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/cfaussie?hl=en.
>>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "cfaussie" group.
> To post to this group, send email to cfaus...@googlegroups.com.
> To unsubscribe from this group, send email to
> cfaussie+unsubscr...@googlegroups.com<cfaussie%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/cfaussie?hl=en.
>



-- 
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

Hands-on ColdFusion ORM Training @ cf.Objective() 2010
www.ColdFusionOrmTraining.com/

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to