| We made some significant improvements about the memory usage of SessionFactoryImpl in the latest 5.2 and more in 5.3. Keep in mind that this object is the central object containing all the metadata information and everything that's needed by ORM so it's normal it's a big one if you have a significant model. Unfortunately, in all the reports, there's no useful information as we just have the overall memory usage of the session factory, which, depending on the model, might not be an issue. I'm going to close this one. If you have issues with our latest versions and can give us details about what is contained in the SF and why it takes too much memory, then, we'll be able to revisit it. But having a 8 MB session factory or even a 100 MB session factory might not be something abnormal depending on the size of your model. So we would definitely need far more details to be able to do something about it. |