Re: [hibernate-dev] Serializable SessionFactory

2018-01-12 Thread Sanne Grinovero
On 12 January 2018 at 16:58, Vlad Mihalcea wrote: > Sure, we need to profile it first. I had started to create a micro-benchmark for it; unfortunately I had to get back on more urgent things, but if someone is willing to let it grow further, it's on github: -

Re: [hibernate-dev] Serializable SessionFactory

2018-01-12 Thread Vlad Mihalcea
Sure, we need to profile it first. >From what our users have told us, getting the metadata from the database takes some time and my goal was to identify whether we can do something about that. I'll come back once I have more info. Vlad On Thu, Jan 11, 2018 at 3:05 PM, Sanne Grinovero

Re: [hibernate-dev] Serializable SessionFactory

2018-01-11 Thread Sanne Grinovero
On 11 January 2018 at 12:39, Steve Ebersole wrote: > I just don't see how serializing a full SessionFactory to disk is a good > idea. > > What do you mean by "avoiding (caching) the DB metadata retrieving the > part"? I'm wondering too. I would be very cautious with that: if

Re: [hibernate-dev] Serializable SessionFactory

2018-01-11 Thread Vlad Mihalcea
Yes, out of the JVM. This PR allows the SF to be serialized to a file, so the next time we bootstrap, we reload the whole SF from the file instead. There are many unforeseen issues probably related to this PR and it might hurt maintenance in the long-run. For this reason, I'm going to leave the

Re: [hibernate-dev] Serializable SessionFactory

2018-01-10 Thread Steve Ebersole
The SessionFactory being Serialized outside the VM? Because otherwise it is already "serializable" via VM serialization hooks and org.hibernate.internal.SessionFactoryRegistry. And I'm not so convinced we should support serializing it for "out of" VM use aside from what we already do which

[hibernate-dev] Serializable SessionFactory

2018-01-10 Thread Vlad Mihalcea
Hi, While reviewing old PRs we have in the ORM project, I stumbled on this one about serializing the SessionFactory. I created a new PR, rebased on top of the current master branch and all tests are passing fine. If anyone wants to take a look, this is the PR: