Maybe this can be of interest.

https://github.com/nhibernate/nhibernate-core/pull/2108

Den fre 3 maj 2019 kl 15:00 skrev Paul Duran <[email protected]>:

> We have a fairly large NHibernate configuration of approximately 300
> entities / tables.
>
> I've taken a memory dump of our application and I can see that the
> SessionFactory memory usage for this configuration is approximately 70MB
> per session factory.
>
> Now, 70MB is not a huge amount - the issue is that we need to be able to
> create sessions across 14 identical databases (i.e. shards). This is
> resulting in 980MB of memory usage.
>
> Currently, the way we do this is to spin up a new Configuration object for
> each connection string and call BuildSessionFactory (so , basically, 14
> times).
>
> I'm wondering if anybody can think of a better approach that shares the
> majority of the session factory 'internals' apart from the connection
> string or, perhaps, whether it would be viable to adjust the connection
> string at the point that a session is constructed.
>
> regards,
> Paul.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/nhusers.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to