Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6654599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:24:32+00:00 2026-05-26T01:24:32+00:00

I have a rather complex mapping for some of my class objects for NHibernate.

  • 0

I have a rather complex mapping for some of my class objects for NHibernate. I have everything mapping correctly; however, it is taking approximately 10-15 minutes to save the items and over 21 minutes to load them, which of course is unacceptable.

Here is my situation.

I have 3 classes, lets call them Foo, Bar, and Test. Class Foo has a property that is a list with a many-to-one mapping of class Bar. Bar has a property that is a list with a many-to-many mapping of class Test. Finally Test has a property that is a list with a many-to-many mapping of class Bar. All three classes have various other properties associated with them of other class types which are being loaded.

I currently don’t have lazy loading enabled at the moment, which I plan on trying to implement soon, but the problem I am facing is that many of the properties for the 3 classes are needed right away.

My first question is this. I have 250 Foo classes saved, 500 Bar classes, and 1000 Test classes. On loading my first Foo class, it is loading the Bar’s that are in its list, which conversely contain a List of all 1000 Test classes, each Test class has a list of all the 500 Bar classes. Is NHibernate data aware enough to know that the 1000 Test classes have been loaded and the 500 Bar classes have already been loaded, so when it moves to the next Foo class it doesn’t have to reload all the Bar and Test classes again?

What would you guys recommend to boost the performance?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:24:32+00:00Added an answer on May 26, 2026 at 1:24 am
    1. Enable Lazy-Load
    2. Check NHibernate logs to see what is exactly selected or use NHibernate Profiler
    3. Consider using cache
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP class that stores a complex multidimensional array, and rather than
I have a legacy class that is rather complex to maintain: class OldClass {
I have a large old program which has some rather complex graphical displays (all
I have a set of rather complex ORM modules that inherit from Class::DBI .
I have a rather complex decorator written by someone else. What I want to
I have to buil a rather complex WPF UI (a hughe Grid) in code
We have a rather large and complex application written in Java which is running
I have a rather large and complex game in C#, and in it are
I have a hash table where the keys are rather complex lists, with sublists
I have a number rather large, complex xml documents that I need to loop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.