• Post Reply Bookmark Topic Watch Topic
  • New Topic

BeanPropertySqlParamterSource vs ParameterMap  RSS feed

 
Adam Jelinek
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that the BeanPropertySqlParamterSource can make things easier, and potentially prevent issues from miss typing the parameter map or row mapper, but what about performance.

I have been trying to find something online that talks about the performance difference between the two, but I have not had any luck. From what I have seen it does the BeanPropertySqlParameterSource does use reflection to call your getters and setters (not necessarily bad). I have to assume that it is a longer code path. Anyways has anyone done any testing? I keep going back and forth, but continue to lean towards coding the parameter maps and row mappers.

Thanks
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt the performance difference is going to be noticeable. The fact that you are not finding any complaints online about it supports this theory. I would not prematurely optimize. If you are using it and not having performance issues than don't worry about it. Choose the method you are most comfortable with and use it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!