Without going into too much detail here, the reason for providing the ability for users to select their proxy engine of choice had much less to do with performance, features, or other aspects of such a choice and more to do with enabling NH adopters to configure NH so that they were only using a single proxy engine across their entire application. For example, if you were already using LinFu, Spring, or another you could simply have NH also use LinFu, Spring, etc. rather than having NH require you to also take a dependency on Castle's Dynamic Proxy support.
There *are* different cases where one proxy engine does out-perform the others, but there is no single engine that consistently out- performs the others in all cases -- I would leave you to your own devices to benchmark them all for yourself and make your own choice. I would offer this however: in any application performing data-access, its probably the case that your performance bottleneck is going to the actual data retrieval rather than generating proxies around returned entities in support of lazy-loading, etc. Because of this constraint, its probably the case that in any real-world scenario the performance differences between the different dynamic proxy libraries aren't so great that you would notice them. In re: what of your own code you need to change to switch proxy engines used by NH, the answer (by design!) is: NONE. This is a config-only change that you can easily make should you feel the need. See http://nhforge.org/blogs/nhibernate/archive/2008/11/09/nh2-1-0-bytecode-providers.aspx for more details. Because this is an easy-to-make config-only change, I would encourage you to experiment with your own application to see if there are performance gains for you in switching from one to another within NHibernate. If you do indeed find one is significantly better performing than another, I'd be interested in having you post your use- case and your results here to the discussion forum so that others could benefit from your investigations. Hope the helps and good luck, -Steve B. On Sep 10, 3:22 pm, AAD <[email protected]> wrote: > We have been using Hibernate with Castle for a couple of years. Are > looking at upgrading from 1.2 to 3.1 and was wondering if anyone could > give a brief summary of the advantage/disadvantage of using 1 of the > above rversus another? > Should we stay with Castle? > How much would have to be changed to convert to one of the other two? > We use C# as the main language and Visual Studip 2008 as the > development tool (moving to VS 2010). > thanks for any feedback, -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
