-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: how to obfuscate a hibernate based application?
PostPosted: Wed Nov 22, 2006 4:40 pm 
Newbie

Joined: Wed Nov 22, 2006 4:21 pm
Posts: 2
I have an end-user application that uses hibernate (the actual database engine is MySQL).

My application tends to use around 100 MB of memory, which is beyond the specifications I have to follow (my app isn't allowed to use more than 60 MB of memory).

I have obfuscated my code (using proguard) and the application now runs at about 80 MB of memory. the two big memory hogs are now SWING (I'm hesitant to, but considering switching to SWT) and hibernate (I've used a memory profiler to verify this).

I tried to obfuscate the hibernate JARs but, would run into problems with Class.forName () calls and classes that weren't obfuscated for some reason, some classes would refer to obfuscated method names when the methods weren't obfuscated, and vice versa. It became a real confusing mess, so I obfuscated everything but hibernate.

Has anyone tried to, or is it really possible to obfuscate hibernate?

Would it be much of a memory decrease?

Are there other things I could try?

Would it help if I switched to another database engine?
What about HSQLDB, which runs inside the JVM, avoiding the overhead of using SQL?

:)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 4:00 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Try to run it using jvm parameter -Xmx80M


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 8:49 pm 
Newbie

Joined: Wed Nov 22, 2006 4:21 pm
Posts: 2
Thank you for the suggesstion.

I have already tried that, and it does make a difference, its just that I want to know what else I can do.

Some had suggessted I implement my application in C/C++ because I can get better memory performance, but I argued for java because I believe it is a better development platform, but now I need to do whatever I can to make my java application as memory efficient as it can be.

:)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.