I am not an expert so hopefully one will speak up just in case I'm wrong,
but:
1) Short answer, yes.
2) Why the '#' symbol in the cfscript version "boo#"? Is this just a typo?
3) Performance difference depends.
part a) If it is just the one line (as in your example), what you gain one
way you may lose another. That is the parsing of the cfscript tag is a
minor performance loss, but then the structinsert is a minor gain.
part b) If there are a number of lines involved, as in the following:
<cfset session.user.var1 = "boo1">
...
<cfset session.user.varz = "booz">
versus
<cfscript>
StructInsert(session.user, "var1", "boo1");
...
StructInsert(session.user, "varz", "booz");
</cfscript>
Then you should gain because the overhead of the cfscript tag is spread over
a number of assignments. Unfortunately I couldn't begin to guess how many
lines you need before the switch to cfscript begins to make sense. Perhaps
the experts can kick in here.
Regards,
Phill
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of A. Karl Zarudny
Sent: June 6, 2002 2:32 PM
To: [EMAIL PROTECTED]
Subject: [CFTALKTor] same things?
Hi everybody.
Are:
<cfset session.user.account = "boo">
AND
<cfscript>
StructInsert(session.user, "account", "boo#");
</cfscript>
the same thing? If so does either perform better than the other in terms
server resources, if there were many users hitting the code simultaneously?
Thanks,
Karl
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "A. Karl Zarudny"
<[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Phill Addorisio" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)