2011/11/16

Performance Anti-Patterns in Hibernate


Patrycja Wegrzynowicz
Snippets:
  • "premature optimization is the root of all evil"
  • "expect unexpected"...
  • avoid temporary changes
  • careful with Collections: inadequate collection mappings can impact resulting # of queries
  • OneToMany on owning side: lots of unnecessary locking / querying
  • bulk processing through Hibernate --> use database operations instead
Conclusion
  • big data = big problems -- my addition: with hibernate :-)
    • standard mappings don't handle large datasets well
    • smart model, bulk processing, projections
  • read the manual
    • hibernate docs
    • think of consequences
  • hibernate
    • smart policies / data structures
Nothing was said of my personal performance finding with Hibernate: maximally use readonly access whenever possible. The support for 'dirty' objects adds a lot of performance overhead if some model-parts are readonly.

No comments:

Post a Comment