Hi Barry, Just to add to what Geoff said:
>>if/then/else (defensive programming) uses less resources (memory, >>processing) than Try/Catch > >I don;t think this is true of CFMX though I may be wrong. I suspect that try/catch >is faster if the exception is rare. That is, if there is no exception it is quicker >than the conditional logic, and if there is an exception it is slower than the >conditional logic. I would add that in CF the use of try/catch is mainly error handling, particularly errors that would otherwise stop the page from executing. It saves the problem for things like testing for a file's existence before reading it. >>declare the number of array elements up front (have a guess first) instead >>of resizing dynamically (memmory issues copying the data). > >This is not required in CFMX. In fact I'm not sure you can nominate a size of array >up front in CF. The ArrayResize() function does this beautifully :-) In fact the books recommend that it be used if you are going to have an array greater than about 500 elements and you know how big it is going to be in advance. I would imagine the reason is as mentioned, an array resize is really a massive copy operation.... >>executing StoredProcs are always faster than executing inline SQL (in the >>code) - for the same query > >This has little if anything to do with ASP/CFMX I suspect. Stored Procs execute >faster on the db server cos they are precompiled. True, but CF just passes over the entire SQL statement within the <cfquery>, once it has filled in the CF variables or whatever, and so the execution time is related to SQL not CF, whereas in asp it is generally a more laborious process. -- Yours, Kym --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
