Brian Kotek said the following on 6/12/2007 8:23 AM:
On 6/11/07, *Anthony Israel-Davis* <[EMAIL PROTECTED]
<mailto:[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