And to test these kind of scenarios requires you to simulate thousands of simultanious hits. And you also have to factor in all kinds of othe rhtings, like current CPU and memory usage at the time, other cfm pages consurrently being requested, locks, db access etc, all of which are going to affect your results.
Russ Michaels Macromedia/Allaire Certified ColdFusion Developer CFMX Hosting Phone: 0845 456 3487 Tech Support: 0906 9607800 FAX: 0709 2212 636 WEB: cfmxhosting.co.uk >Please use the support helpdesk on our web site to submit support tickets.< Join our ColdFusion Developer discussion lists. Send an e-mail to [EMAIL PROTECTED] > -----Original Message----- > From: Simon Horwith [mailto:[EMAIL PROTECTED] > Sent: 21 January 2004 17:15 > To: [EMAIL PROTECTED] > Subject: RE: [ cf-dev ] Nested IIf functions > > > technically, using one approach or another does matter... but > only if that specific functionality (in this case, "if > logic") is used A LOT by all pages being requested at any > moment. One of my most recent articles in CFDJ showed an > example of the difference between using java string > concatenation and using "traditional" CFML string > concatenation in a <cfscript> block. Up to 100 iterations > and you still barely saw a performance difference. When I > bumped it up higher (I believe it was to 10,000 iterations), > the java version outperformed the CF version DRASTICALLY... > it took about 1/100 the amount of time to run. If you have > 1000 visitors simultaneously requesting pages on your site > and each page does 10 string concatenations, you'll see the > same effect on the server in terms of processor and memory > resource usage. If your site or your secific application > isn't trafficked too heavilly and you aren't using one > specific function all over the place, then it's not going to > matter... but when something does need to scale to accomodate > heavy traffic periods then 10 ms. differences do begin to > amount to more serious performance hits. Just something I > wanted to point out. If anyone wants to try running the code > I'm talking about, I'll post it. > > ~Simon > > Simon Horwith > CTO, Etrilogy Ltd. > Member of Team Macromedia > Macromedia Certified Instructor > Certified Advanced ColdFusion MX Developer > Certified Flash MX Developer > CFDJList - List Administrator > http://www.how2cf.com/ > > > -----Original Message----- > From: Steve Martin [mailto:[EMAIL PROTECTED] > Sent: 21 January 2004 16:47 > To: [EMAIL PROTECTED] > Subject: RE: [ cf-dev ] Nested IIf functions > > > I agree. Life's too short to worry about these little things. > You can tweak and tweak to your hearts content, but at the > end of the day, slapping in an extra 512meg brick of RAM or > u/g ing the CPU will be quicker and cheaper than fannying > around in your code for that extra bit of power. I mean, how > far do you take it? You could rewrite portions of code as > pure Java CFX and so on. > > > -----Original Message----- > > From: Snake Hollywood [mailto:[EMAIL PROTECTED] > > Sent: 21 January 2004 16:28 > > To: [EMAIL PROTECTED] > > Subject: RE: [ cf-dev ] Nested IIf functions > > > > > > If the page takes 100ms without IIF and 100ms with IIF, it > > doesn't matter > > how many page requests u get, they still take the same time > to render. > > > > 100 vistors x 100ms still equals the same. > > The total combined may add a few ms extra as all the > > fractions of a ms add > > up, but that's like counting grains of sand. > > > > Russ Michaels > > Macromedia/Allaire Certified ColdFusion Developer > > > > CFMX Hosting > > Phone: 0845 456 3487 > > Tech Support: 0906 9607800 > > FAX: 0709 2212 636 > > WEB: cfmxhosting.co.uk > > > > >Please use the support helpdesk on our web site to submit > > support tickets.< > > > > Join our ColdFusion Developer discussion lists. > > Send an e-mail to [EMAIL PROTECTED] > > > > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] > > > Sent: 21 January 2004 16:18 > > > To: [EMAIL PROTECTED] > > > Subject: RE: [ cf-dev ] Nested IIf functions > > > > > > > > > > > > what if you had say 100 sites, each with 100 pages. in each > > > of those pages you use IIF where you could have used > > > something faster. each site gets thousands of hits a day. > > > could that not have a cumulative effect on cf server's > performance? > > > > > > the whole point of writing code that is marginally faster in > > > performance than something else, isn't because it's > > > super-duper faster on one run-through, or that you're only > > > meant to use it in nested loops. it's to improve overall > > > performance in the long run, isn't it? > > > > > > > > > Duncan Cumming > > > IT Manager > > > > > > http://www.alienationdesign.co.uk > > > mailto:[EMAIL PROTECTED] > > > Tel: 0141 575 9700 > > > Fax: 0141 575 9600 > > > > > > Creative solutions in a technical world > > > > > > > > > ---------------------------------------------------------------------- > > > Get your domain names online from: > > http://www.alienationdomains.co.uk > > > Reseller options available! > > > > > > ---------------------------------------------------------------------- > > > > > > ---------------------------------------------------------------------- > > > > > > > > > > > > > > > "Snake > > > > > > Hollywood" To: > > > <[EMAIL PROTECTED]> > > > <[EMAIL PROTECTED] cc: > > > > > > kepit.net> Subject: RE: > > > [ cf-dev ] Nested IIf functions > > > > > > > > > 21/01/2004 16:14 > > > > > > Please respond > > > > > > to dev > > > > > > > > > > > > > > > > > > > > > > > > > > > I hate when people start this. > > > You will only see any overhead if you use hundreds of IIF > > > statements in a page or in some sort of nested loop. > > > Otherwise the difference is too small to notice, it wont even > > > make a 1ms difference to your page if you have a cfif instead > > > of an IIF. > > > > > > Russ Michaels > > > Macromedia/Allaire Certified ColdFusion Developer > > > > > > CFMX Hosting > > > Phone: 0845 456 3487 > > > Tech Support: 0906 9607800 > > > FAX: 0709 2212 636 > > > WEB: cfmxhosting.co.uk > > > > > > >Please use the support helpdesk on our web site to submit support > > > >tickets. > > > < > > > > > > Join our ColdFusion Developer discussion lists. > > > Send an e-mail to [EMAIL PROTECTED] > > > > > > > > > > -----Original Message----- > > > > From: EWS [mailto:[EMAIL PROTECTED] > > > > Sent: 21 January 2004 10:44 > > > > To: [EMAIL PROTECTED] > > > > Subject: Re: [ cf-dev ] Nested IIf functions > > > > > > > > > > > > Just a quick point. IIF is great but use sparingly. If > > possible use > > > > CFSWITCH of CFIF as IIf does have a greater processing > > overhead. If > > > > this is not possible then IIf is fine and does a great job. > > > > > > > > Just a thought > > > > > > > > On Wed, 21 Jan 2004 10:34:25 -0000, Tomo Smith > > > > <[EMAIL PROTECTED]> > > > > wrote: > > > > > > > > > > > > > > #IIf(GetPatients.wait_time_mins[i] GT 381000, DE("red"), > > > > > 'IIf(GetPatients.wait_time_mins[i] GT 375000, DE("orange"), > > > > > DE("blue"))')# > > > > > > > > > > try the iif statement above. I changed your DEs to use > > > > double quotes, > > > > > and > > > > > your inner IIF has single quotes around it, otherwise it > > > wont work! > > > > > > > > > > Cheers, > > > > > > > > > > Tom > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Osullivan Karl (RKB) Senior Analyst/Programmer" > > > > > <[EMAIL PROTECTED]> > > > > > To: "CF - Development Group" <[EMAIL PROTECTED]> > > > > > Sent: Wednesday, January 21, 2004 10:27 AM > > > > > Subject: [ cf-dev ] Nested IIf functions > > > > > > > > > > > > > > >> > > > > >> UHCWT Logo > > > > >> > > > > >> > > > > >> Hello > > > > >> > > > > >> Is it possible to nest IIf statements, as I'm trying > to do the > > > > >> following: > > > > >> > > > > >> style="background-color:#IIf(GetPatients.wait_time_mins[i] > > > > GT 381000, > > > > >> DE('red'), IIf(GetPatients.wait_time_mins[i] GT 375000, > > > > DE('orange'), > > > > >> DE('blue')))#;" > > > > >> > > > > >> However, when I run this, the following message appears > > > > >> > > > > >> > > > > >> Variable orange is undefined. > > > > >> > > > > >> > > > > >> > > > > >> Is my syntax wrong? I thought it looked okay. Obviously > > > > the above > > > > >> is within a <CFOUTPUT> tag. > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> Karl O'Sullivan > > > > >> Senior Analyst/Programmer > > > > >> > > > > >> Computer & Network Services > > > > >> UHCW NHS Trust > > > > >> Clifford Bridge Road > > > > >> COVENTRY > > > > >> CV2 2DX > > > > >> > > > > >> Contact: > > > > >> Tel (internal): 28952 > > > > >> Tel (external): +44 (0) 24 7696 8952 > > > > >> Email: [EMAIL PROTECTED] > > > > <mailto:[EMAIL PROTECTED]> > > > > >> Web: www.uhcw.nhs.uk > > > > <http://www.uhcw.nhs.uk> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > ** Archive: > > > http://www.mail-archive.com/dev%> 40lists.cfdeveloper.co.uk/ > > > > > > > > > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] For > > > > human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > -- > > > ** Archive: > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > -- > > > ** Archive: > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- > > ** Archive: > http://www.mail-archive.com/dev%> 40lists.cfdeveloper.co.uk/ > > > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] For > > human help, e-mail: [EMAIL PROTECTED] > > > > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > > > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
