If you have to choose between more than a couple of items use CFSWITCH, whi ch is a pretty straightforward case evaluation tool that speeds up processi ng quite a bit over blocks of CFIF/CFELSE/CFELSEIF statements.
If you use CFIFs, Look into using Compare() and CompareNoCase() in tests fo r equivalency. They're much faster, but a bit harder to grasp than the sta ndard ''cfif this eq that'' syntax. CFSET variables.blah="Y" CFIF NOT CompareNoCase(variables.blah,"Y") ...variables.blah is ''Y''... CFELSE ...variables.blah is not ''Y'' /CFIF http://www.fusionauthority.com/alert/index.cfm?alertid=5#Tech2 --------------------------------------- Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc., www.mysecretbase.com --------------------------------------- ---------- Original Message ---------------------------------- from: Tony Schreiber <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] date: Mon, 4 Mar 2002 17:16:24 -0500 (EST) I'm not sure, but talk around this list has said that iif() is SLOWER than cfif... > Not alot of performance issues, but you could consider using iif() > instead of a bunch of <cfif> > > > > > Doug Brown > ----- Original Message ----- > From: "Gilbert Midonnet" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, March 04, 2002 1:41 PM > Subject: site performance questions > > > > I'm redesigning a site and I have questions regarding how the use of > > <cfapplication> and <cfinclude> affects performance. > > > > 1. I have a drop-down navigation in a top frame. I would like to put > the > > graphics in the nav to change according to the section the user is in > and am > > wondering about how my alternatives affect load time. > > > > a. For each navigation element use an if-else. If user is in > > directory A show {graphicA_on} else {graphicA_off}. If user is in > directory > > B show {graphicB_on} else (graphicB_off}. > > b. Use <cfapplication> > > > > 2. Each page has a hardcoded left-side navigation with each page > having the > > corresponding link highlighted. Of course this leads to maintenance > > problems. I would like to use > > > > if this.document.url = url then X else Y in an include file or > > cfapplication file. > > > > > > The coding is simple. I'm concerned about performance. How does much > does > > this if-elses and includes slow things down? On average there are > 20,000 > > page hits/day. > > > > TIA > > > > > > Gilbert Midonnet > > BrokerTec USA, LLC > > (201) 209-7843 > > > > > > > > > > > ------------------------------------------------------------------------- > --- > > --------------------------------------------------- > > This message is for the named person's use only. It may contain > > confidential, proprietary or legally privileged information. No > > confidentiality or privilege is waived or lost by any mistransmission. > If > > you receive this message in error, please immediately delete it and > all > > copies of it from your system, destroy any hard copies of it and > notify the > > sender. You must not, directly or indirectly, use, disclose, > distribute, > > print, or copy any part of this message if you are not the intended > > recipient. > > > > > > > > > ______________________________________________________________________ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists