Chapter 5. Improving Performance

In this chapter, we will cover the following recipes:

  • Reducing application startup time
  • Using MultiCriteria
  • Using MultiQuery
  • Using Futures
  • Eager loading child collections
  • Using stateless sessions
  • Using read-only entities
  • Use the second-level cache
  • Configuring the second-level cache with code
  • Sharing databases for performance

Reducing application startup time

The process of configuring NHibernate is fairly intensive and takes time. NHibernate has to load, parse, and compile all our mappings and reflect the model. In this recipe, we'll show you how to reduce the start up time of your NHibernate application.

Getting ready

Complete the Configuring NHibernate with App.config recipe discussed in the Chapter 1, The Configuration and ...

Get NHibernate 4.x Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.