Vincent Bouthinon (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *commented* on HHH-16840 (
https://hibernate.atlassian.net/browse/HHH-16840?atlOrigin=eyJpIjoiZjBjNz...
)
Re: Allow serialization of ScanResultImpl to speed up the creation of the
entityManagerFactory (
https://hibernate.atlassian.net/browse/HHH-16840?atlOrigin=eyJpIjoiZjBjNz...
)
The primary objective is to optimize the creation time of the sessionFactory
(entityManagerFactory).
For the following contexts:
* Execution of integration tests, knowing that we have several hundred or even thousands
of them, and the JVM is forked. Each second saved significantly reduces the time for
validating all the tests.
* Also, the nightly batch chain, which contains over 300 batches, and each batch starts
its own JVM.
* For the startup of the application server as well, but it's more of a development
issue because in production, the server is not restarted frequently.
In my test case, I have an environment of 500 entities, and the creation takes 20s. The
classpath scan takes half of the time, which is 10s.
On my project side, I have implemented a detection of classpath modification by using a
checksum of file modification dates, which I store in the wrapper of the serialized
scanResult. This allows me to know when I need to refresh it.
To serialize, I therefore need ScanResultImpl and its dependencies to be serializable. I
will also present you the code that I have implemented in my project.
(
https://hibernate.atlassian.net/browse/HHH-16840#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16840#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227- sha1:a102ba3 )