Performance issues in Dozer due to ReflectionUtils

296 views
Skip to first unread message

Gajendra Singh Rao

unread,
Aug 11, 2015, 8:20:49 AM8/11/15
to Dozer Mapper

We have using Dozer for mapping domain objects coming from external application to our domain objects. The source objects data structure is XML based so good amount of nested attributes are there. We have recently started observing performance issue in the mapping. Earlier we were using 5.4.0 but not switch ed to 5.5.1 to see no improvements in slowness

We have been using deep field mapping (primary reason why we needed dozer) and saw that good amount of time is spent in ReflectionUtils.getDeepFieldHierarchy().

I agree that BeanUtils has caching mechanism however getDeepFieldHierarchy() method itself has good amount of code and string operations which is not able to take the advantage of BeanUtils's cache.

I put a dirty cache and the method and saw improvements (time to map 500 objects of 50 attributes each got reduced from 750 ms to 550 ms). Since Dozer is external utility and we do not want to keep custom code in our code base as it will be make upgrade very difficult.

Do you have any plan to introduce caching in ReflectionUtil?

Reply all
Reply to author
Forward
0 new messages