orika-mapper / orika

Simpler, better and faster Java bean mapping framework
http://orika-mapper.github.io/orika-docs/
Apache License 2.0
1.29k stars 268 forks source link

Orika Best Practises #306

Closed bfrisoni closed 5 years ago

bfrisoni commented 5 years ago

From the performance tuning wiki page, I understand that it would best to do the follow ( https://orika-mapper.github.io/orika-docs/performance-tuning.html ) :

  1. MapperFactory should be used as a singleton
  2. MapperFacade should be used as singleton
  3. Type<?> should be cached.
  4. Use BoundMapperFacade for 2 particular types to speed up performance even more. What it doesn't state is if the BoundMapperFacade should be cached as well or if this is done internally by orika? If there is documentation stating this please point me in that direction.

Thanks!

elaatifi commented 5 years ago

BoundMapperFacade are cached within a MapperFactory. Also only one MapperFacade is available per MapperFactory

bfrisoni commented 5 years ago

Thanks!!