r/SpringBoot • • Apr 21 '26

Question Why is DataClassRowMapper/BeanPropertyRowMapper way less performant than Custom row mapper?

The title. I tried implementing a custom row mapper, and the performance difference was huge (half the cpu consumption). I'm trying to understand why it's the case. Any resources or hints will be appreciated ​

6 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/SoftwareArchitect101 Apr 21 '26

The number of rows are same. I use reflection but only once to create the index. I measured by running entire application (keeping everything else same)