> I think the point that Joe (and I) am trying to make is that > while looping a million times is unrealistic, it does > illustrate a problem -- the code is up to 80 times slower. > > Yes, you won't have any 1 - 1,000,000 loops in a typical cfm > template, but you may have 100 concurrent users doing 1- 100 > loops. > > So, every bit that you save on 1 user is multiplied 100 times > (in this example).
The problem with iterative tests is that they don't always reflect non-iterative usage accurately. To translate that into English, looping over something a million times isn't analogous to having a million users running one iteration each. This is a trap that lots of people fall into, because it seems pretty sensible on its face and because it's easier than doing a load test, but you'd really have to run a load test to see what difference it makes with regular code, rather than testing individual unrealistic test cases. My wholly unsubstantiated guess is that, given typical pages in CF vs JSP, there will be little significant performance difference under load. Note that I haven't tested this yet, since it's time consuming to do load tests to say the least, but I just don't think that these sorts of performance issues will make much of a difference in the grand scale of things. I'd be much more concerned about inefficiencies with database access (whether caused by the CF developer by writing bad code, or by inefficiencies within the database access layer itself). > I think that Matt would agree that this can be a very important > determination if an application, nay web site, scales well. I think it's funny that we think it's worthwhile to invoke Matt's name on this. I'm sure he can speak for himself. But, for fun I'll do the same thing and say that I think Matt would agree that complex business logic should be put in something other than CF, like Java. > Say for example, Victoria's Secret had a loop (or equivalent > inefficient code) in their main cfm page -- when they do one > of their "Angel" TV specials this (optimization) could make > the difference whether the site could handle 100 concurrent > hits or 10,000 -- or whether it reaches the point where it > is on the wrong side of the power curve and just eats itself > up! > > Joe's point, and mine is that this is a factor that can > contribute to the overall performance and scalability of a > CF web site -- not the only factor, maybe not the most > important factor, but an important factor, nonetheless! My point is that it's worthwhile putting things that aren't presentation logic in something other than CF where possible. It has always been worthwhile to do so, and may be more worthwhile now. For years, we've typically used the database for this sort of thing; now we might use Java as well. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ::::::::::::: dream :: design :: develop ::::::::::::: MXDC 02 :: Join us at this all day conference for designers & developers to learn tips, tricks, best practices and more for the entire Macromedia MX suite. September 28, 2002 :: http://www.mxdc02.com/ (Register today, seats are limited!) :::::::::::::::::::::::::::::::::::::::::::::::::::::: ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm 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