Paul Vernon wrote:
> 
> <cfthread name="#CreateUUID()#" action="run" eventArgs="#arguments#">
>       <!--- event invocation code here... ---> </cfthread>
> 
> The problem I'm seeing is that when lots of small events are firing, using
> cfthread is actually slower than not threading the code because along with
> the cfthread instantiation which is deep copying my arguments, CreateUUID()
> is *slow* and introduces even more lag into the request.

And if you think it is bad now, just wait until you run it under load. 
The total number of UUIDs created per second is independent of the 
number of threads or processors, but fixed at some multiple of the 
number of clock ticks per second Java has on your platform.


> Does anyone have any suggestions to reliably replace CreateUUID() for
> performance but still remain unique?

Thread names do not have to be unique, they only have to be unique for 
the request. Using something like name="t#request.threadcounter++#" 
should work just fine.

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

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