After having seen thread after thread on this list and others discussing code optimization for CF I am left with the following impression. People seem to be missing the forest for the trees.
Every idea/technique that has been suggested thus far for code optimization is a waste of time for almost all applications. Sure some of these ideas/techniques code save a few milliseconds here and there, but they offer very small gains in scalability. There are much simpler ways to achieve greater scalability in less time than code optimization e.g. caching. I suggest people spend their time seeking out these ways instead of spending time on code optimization. You should only spend time on code optimization after every other performance enhancement has been tried. Further, servers are so cheap these days that adding additional hardware tends to be far cheaper than developer time. Matt Liotta President & CEO Montara Software, Inc. http://www.montarasoftware.com/ 888-408-0900 x901 > -----Original Message----- > From: Dick Applebaum [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 9:18 PM > To: CF-Talk > Subject: Re: Jsp Vs Cfm (CFMX) -- Test Code > > Daron > > I think the point that Joe, I and some others are trying too make is > that we want *more* optimized CF-generated Java code rather than code > in Java itself. > > The reason that a knowledgeable Java person like joe is looking at the > CF-Generated code is to see if he can determine why it is so slow -- so > that maybe something can be done to improve the performance of > CF-generated code by: > > 1) avoiding things that cause inefficient code generation > > 2) making suggestions how/where code-generation could be improved. > > I am not a Java heavy, and I have the same goal. I can look at the > generated code and see it is correct, but inefficient (though I can't > say how). > > But, if the problem is caused by lack of typing, it seems to me that > this is something MM can fix rather easily by allowing type definition > by those who want to do it, and generating efficient code if it is > present or use the current generation if it is not. > > Sean made a point that CF has to assume that numbers (including loop > counters) are real -- I can understand that -- if CF is not told > differently. > > However if one had the option of defining a type attribute of long for > x, Cf could generate much better code. > > I've programmed a lot of loops in since my first programming class in > 1956 (yes I am old). I have yet to use a real as a loop counter except > in some classroom problem. > > I think that CF would lose little and gain quite a lot if it allowed an > optional type definition. > > Then it could generate better Java code. > > And there would be less need to program parts of your application in > Java. > > Think of it as extending the reach of CF to places it could not go > before. > > BTW, nulls should also be allowed in CF! > > Dick > > On Tuesday, September 17, 2002, at 11:19 PM, Darron J. Schall wrote: > > > I see the argument you're making... but you misread/misunderstood the > > point of what I was saying.... > > > > CFMX is awesome in that it allows you to develop applications very > > rapidly. Compared to java, it's much simpler and allows for faster > > development. Java is awesome in that it allows for complex > > enterprise-level computations to be done in an efficient/optimized > > manner. It may take longer to code if you don't know it that well, but > > if you don't know it that well then you don't fall into the category of > > people that I was trying to make a point to. > > > > It makes sense from a programming standpoint to handle the "difficult" > > things in java where you know your code will be as optimized as you can > > make it, rather than trying to make the CFMX compiler optimize code > > that > > you could probably better optimize yourself (I apologize for this > > sounding redundant, it's late...). When you're digging into the java > > files generated by the pages and looking at how it could be optimized, > > doesn't it make sense to just write the optimized code in java if you > > know what you're doing? If you don't agree, then, again, you're > > missing > > the point. You still use CFMX, but when performance counts and highly > > optimized files are necessary, it starts becoming more of a front-end > > with a java enterprise-level backend on large-scale applications. > > > > I wasn't knocking CFMX at all -- I was saying that it makes sense to > > optimize your own "complex" code with java if you've got the > > experience... Java + CFMX is a great marriage, when used in conjunction > > at the right times. :-) > > > > -Darron > > > > -----Original Message----- > > From: Joe Eugene [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, September 17, 2002 2:29 PM > > To: CF-Talk > > Subject: RE: Jsp Vs Cfm (CFMX) -- Test Code > > > >> That way you don't have to rely on the CFMX compiler at all, and you > > can > >> work in all of your own optimizations, AND you don't have to deal with > > JSP > >> at all either. > > > > So what does the $5000 software do? Oh Yea i can start writing this > > with > > C#, that does NOT require any other software and it will still be > > faster > > right? > > So whats your argument to your CLIENT for using CFMX just "RAD"? > > > > Joe > > > >> -----Original Message----- > >> From: Darron J. Schall [mailto:[EMAIL PROTECTED]] > >> Sent: Tuesday, September 17, 2002 4:12 PM > >> To: CF-Talk > >> Subject: Re: Jsp Vs Cfm (CFMX) -- Test Code > >> > >> > >> Just chiming in here... > >> > >> If you're doing some code that you know can be optimized (by > >> looking at the > >> java file produced by CFMX), then doesn't is make sense to just > >> optimize it > >> yourself in java? I would imagine that if you ARE looking at the > >> java code, > >> then you at least know enough to get around. If that's the case > >> and you're > >> really worried about performace, just write you own class and methods, > > and > >> call them via > >> > >> <cfset myOwnOptimizedClass = CreateObject( 'java', 'myJavaClass' )> > > > >> > >> Just my 0000 0000 0000 0010 cents. > >> > >> -Darron > >> > >> > >> > > > > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.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