RE: Performance (From the Mach-II Group)
 
Kurt Wiersma said the following on 6/7/2007 9:06 AM:
 
> Are you using ColdSpring's autowiring for your model or all the
> relationships defined in your CS configuration file(s)?  Autowiring is
> very slow by nature of introspecting all the CFCs.  Also, Chris Scott
> mentioned to me the other day that CS is up to five times slower when
> using deeply nested constructor-args via plain old property
 
I think the "performance hit" was reloading the M2 framework during
development, so performance probably was the wrong word.  I haven't
noticed any significant slowness, but my config files aren't all that
big right now.  I suspect M2 in production (-1) would only see any
slowness the first time the app was loaded.
 
Autowiring is the right solution for me.  I didn't realize that without
the autowiring I would have to explicitly define the properties in the
CS config file, which I was trying to avoid since it seemed to defeat
one of the purposes I was trying to achieve with inheritance. 
 
All in all a good learning experience - I now understand CS even better
and am trying to figure out how I managed all my CFCs this long without
it.
 
anthony 

 
________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Brian Kotek
Sent: Tuesday, June 12, 2007 6:23 AM
To: [email protected]
Subject: [coldspring-dev] Config/Inheritance Question


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?



        It still seems like one should be able to define a base class
and 
        inherit from it with properties intact, but there may be
something I'm 
        just not "getting" about the Coldspring paradigm.


You can define a base class and inherit from it. Public getters and
setters for properties in a base class are autowired when you create a
subclass (assuming you pass the subclass the appropriate properties in
the XML). This seems to be the part that is confusing people. If you set
this up correctly it absolutely does work. 



        For now, I think autowiring will work in those cases where I'm
using
        inheritance and I'll explicitly define my mock objects in my
unit test
        xml.
        
        Thanks for the link. It validated my confusion and pointed me in
the 
        direction of a workaround.


I commented again on Doug's blog to explain his error more completely.

Hope this helps,

Brian



Reply via email to