OK, point conceded. I know that on a very large set of CFCs in development this can take some time, especially like something such as Mach-II or Model-Glue that will force all the beans being injected into the listeners to be created every time (no lazy loading there). I also agree that explicitly defining the properties for each bean is better in terms of documentation. But with regard to autowiring, I suppose I'd say the performance hit in development is limited to a fairly specific situation, i.e. you have a large number of CFCs and also use a framework that forces them all to be created on every request. As Peter says (and it's always good advice), do what works for you.
On 6/12/07, Peter J. Farrell <[EMAIL PROTECTED]> wrote:
Brian Kotek said the following on 6/12/2007 8:23 AM: On 6/11/07, Anthony Israel-Davis <[EMAIL PROTECTED] > wrote: > > I had turned global autowiring off because I just read on the Mach-II > group that there can be a substantial performance hit, so I'll just do > it on a case by case basis. Not sure what the deal is here, since the autowiring only happens one time (at app startup)? What is the "performance hit" being discussed here? Ok, I'll bite since I'm the one that mentioned something like this on the Mach-II list. I was talking to Chris he mentioned that deeply constructed *constructor-args* for some reason can be upto five times slower than using the property tag for injection. As for performance hit, it only happens on application startup -- however introspection based systems typically run a bit slower. Well, if you have to look at something and make complex decisions -- how course it's going to be slower than explicitly defining all the relationships. On smaller systems, autowiring is fine -- however as the model grows -- the different can be many seconds on reloading the application. During development, those secs can mean a lot -- especially if the difference is 10-20+ seconds... In the end, it all depends -- do whatever works for you. However, I typically prefer to define my beans and their properties in the config file as it's great documentation. It's especially good when you need to swap stuff about -- I prefer a nice search and replace in one file versus opening many CFCs or a file search. Again it's just preference... .pjf
