> Turns out the cfinvoke doesn't support 'object' parameter as in your
> example.
Yeah, Ian corrected me above on that. You use 'component' for both a
componet name and a component instance (which seems odd). FB4/5 XML
grammar's INVOKE verb has an 'object' attribute for specifying an
existing object, and having never used CFINVOKE, figured they were the
same.
cheers,
barneyb
On 9/14/06, Tom Kitta <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I actually did a test:
>
> <cfif not isDefined("application.imgobject")>
> <cfobject component="#application.cfcbase#common" name="com">
> <cfset application.imgobject = com>
> </cfif>
>
> <cfset scaleMethod = "myTestMethod">
>
> <cfset tt = getTickcount()>
> <cfloop index="m" from="1" to="1000" step="1">
> <cfinvoke method="#scaleMethod#" returnvariable="retVar"
> component="#application.imgobject#">
> <cfinvokeargument name="t1" value="123">
> <cfinvokeargument name="t2" value="123">
> </cfinvoke>
> </cfloop>
> <cfoutput>M1: #getTickCount()-tt#<br><br></cfoutput>
>
> <cfset tt = getTickcount()>
> <cfloop index="m" from="1" to="1000" step="1">
> <cfset retVar = evaluate("application.imgobject." & scaleMethod &
> "(123,123)")>
> </cfloop>
> <cfoutput>M2: #getTickCount()-tt#</cfoutput>
>
> where the function is:
>
> <cffunction name="myTestMethod" access="public" returntype="string"
> output="false" displayname="Get full website address without http or https"
> hint="This is used by CFCs that need to know website address, webpages use
> value from application.cfm">
> <cfargument name="t1" required="true" type="numeric" displayname="sort
> modifier" hint="">
> <cfargument name="t2" required="true" type="numeric" displayname="sort
> modifier" hint="">
> <cfreturn 1000>
> </cffunction>
>
> Turns out the cfinvoke doesn't support 'object' parameter as in your
> example. It also turns out that evaluate is still not as fast as some people
> claimed. I agree that using evaluate in almost all cases is a bad idea,
> through saying so in a phone interview most likely costed me a contract :(
> cfinvoke is 50% faster then using evaluate.
>
> TK
>
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/
Got Gmail? I have 100 invites.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253150
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4