Equivalent of NHibernate batch_fetch_style property #483
-
For my .HasMany() relationships I'm using something like .BatchSize(16) to alleviate N + 1 performance issues. This works well, but a well-known problem is that it can significantly increase memory usage of BatchEntityLoader. There is a parameter in NHibernate called hibernate.batch_fetch_style that lets you trade off a bit of performance for lower memory usage. I would like to try the Dynamic setting. How do I access this parameter in Fluent NHibernate? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This parameter is not ported to NHibernate, you are referring to Hibernate documentation. So you cannot configure it with Fluent, since it does not exist in NHibernate. |
Beta Was this translation helpful? Give feedback.
This parameter is not ported to NHibernate, you are referring to Hibernate documentation. So you cannot configure it with Fluent, since it does not exist in NHibernate.
The memory usage issue is known, see nhibernate/nhibernate-core#1316. Porting the Hibernate setting is one way to solve it, as already commented in the issue. It awaits someone interested in contributing a fix.