-
From: Mike Soultanian [mailto:[EMAIL PROTECTED]
Sent: 24 July 2006 04:17
To: CF-Talk
Subject: Re: iif: am I understanding correctly?
Don't use iif()
Always use cfif/cfelse instead of iif(). It is significantly faster and more
readable.
Mike
]
Sent: Monday, July 24, 2006 2:18 PM
To: CF-Talk
Subject: RE: iif: am I understanding correctly?
This always makes me laugh.
Why don't you make a page with CFIF, then run it
Now use IIF() and run it
What difference do you see in execution time? Bugger all.
If you make a big loop that calls IIF
:[EMAIL PROTECTED]
Sent: Sunday, July 23, 2006 11:17 PM
To: CF-Talk
Subject: Re: iif: am I understanding correctly?
I saw this written in the Coldfusion coding practices from Sean Corfield:
http://livedocs.macromedia.com/wtg/public/coding_standards/performance.htm
l
Performance Don'ts
Message-
From: Phillip Holmes [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 23, 2006 2:26 AM
To: CF-Talk
Subject: RE: iif: am I understanding correctly?
You must have copied the code straight off the page. The ticks that my
blog
displays are blowing up CF.
Try this.
cfscript
Does it? I'm assuming you're referring to dynamic variables (from
reading your other reply), but my cfif example has a dynamic variable as
well.
-Original Message-
From: loathe [mailto:[EMAIL PROTECTED]
Sent: Friday, July 21, 2006 2:37 PM
But it executes much faster.
cfif didquery and didfind
cfset temp = variables[getCust][i]
cfelse
cfset temp =
/cfif
Does the same thing right?
-Original Message-
From: Munson, Jacob [mailto:[EMAIL PROTECTED]
Sent: Friday, July 21, 2006 4:43 PM
To: CF-Talk
Subject: RE: iif: am I understanding
: am I understanding correctly?
Does it? I'm assuming you're referring to dynamic variables (from
reading your other reply), but my cfif example has a
dynamic variable as
well.
-Original Message-
From: loathe [mailto:[EMAIL PROTECTED]
Sent: Friday, July 21, 2006 2:37 PM
@houseoffusion.com
Sent: Friday, July 21, 2006 2:52 PM
Subject: RE: iif: am I understanding correctly?
OK, I ran cftimer on both examples, iif and the if/else way,
and both came
back 0 ms. So I think in this case, since it's only looping
over 10 list
items or whatever, I'll stick with the leaner
cf-talk@houseoffusion.com
Sent: Friday, July 21, 2006 2:52 PM
Subject: RE: iif: am I understanding correctly?
OK, I ran cftimer on both examples, iif and the if/else way,
and both came
back 0 ms. So I think in this case, since it's only looping
over 10 list
items or whatever, I'll stick
This part of the app is not going to take heavy traffic, so
the performance
hit would be negligible. However going forward I will always
take into
consideration the possible performance implications of
iif/evaluate/DE.
Yeah, and another thing to keep in mind when memorizing things that
10 matches
Mail list logo