Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NHibernate validator performance

What do you know about NHibernate validator performance? I plan to use it, but it use reflection and I worry about performance...

like image 614
Andy Avatar asked May 20 '26 01:05

Andy


1 Answers

If you refuse to run .net code just because it uses reflection, you'll have very few bits left available to run. Use of reflection does not imply a significant performance hit. Unless you have to run some reflection code in a tight loop or have to run on a low-powered processor (mobile perhaps), or is incorrectly used, reflection is not typically a significant hit to the overall application performance. Even so, reflection is usually cached so it only happens once per operation. In the concrete case of NHibernate.Validator, most (all?) of the reflection work happens at startup only.

If you know you have special performance requirements, measure it, just as everything else involved.

like image 56
Mauricio Scheffer Avatar answered May 21 '26 19:05

Mauricio Scheffer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!