>>Performance on
the mailer is a lot slower than I'd like, and I suspect its because I'm
using evaluate.

Here is a test I made on my develop system (3000 MHz):
<CFSET myStruct = structNew ()>
<CFSET myStruct.myvar = "test">
<CFSET start = GetTickCount()>
<CFLOOP INDEX="i" FROM="1" TO="100000">
    <CFSET test = evaluate ("mystruct.myvar" & "")>
</CFLOOP>
<CFOUTPUT>Time = #numberFormat(GetTickCount()-start, "999")#<BR></CFOUTPUT>

<CFSET start = GetTickCount()>
<CFLOOP INDEX="i" FROM="1" TO="100000">
    <CFSET test = mystruct['myvar' & ""]>
</CFLOOP>
<CFOUTPUT>Time = #numberFormat(GetTickCount()-start, "999")#<BR></CFOUTPUT>

The results are (in avarage):
Time = 530 msec
Time = 200 msec

This show that
1. evaluate takes more than twice the double than struct notation;
2. the difference is about 1/3 sec for 100000 iteration, then, unless 
you really use
evaluate in some million iterations loop, the difference is not really 
significant.

There are many other places to look for optimization, the first being 
queries and correct indexes in the database.


-- 
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238267
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to