开发者

JDBC memory usage vs Hibernate memory usage with web app?

开发者 https://www.devze.com 2023-03-29 14:40 出处:网络
I am comparing memory usage of Hibernate vs JDBC for a small web app Assuming an aver开发者_如何学Goage computer with 4 GB of RAM...

I am comparing memory usage of Hibernate vs JDBC for a small web app

Assuming an aver开发者_如何学Goage computer with 4 GB of RAM...

Does anyone have an estimate or actual data on how much memory an application using JDBC to connect to a database uses?

Similarly, does anyone have an estimate or actual data on how much memory an application using Hibernate with

(i) Level Two cache enabled

(ii)Level Two cache disabled

use?

I did some tests myself but the computer used was very slow and rather old so I don't believe my data is very useful and thus would appreciate any rough results/feedback.


This is impossible to answer other than to observe that since JDBC is a lower-level API, you could use it with less memory consumption. Actual amounts of memory consumed will vary enormously depending on datasets to be loaded, cache configurations, and how the code is written. You could easily write code using either JDBC or Hibernate that uses far more memory than the other.

0

精彩评论

暂无评论...
验证码 换一张
取 消