Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compile with Debug and with No Debug

 
sopal Pal
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
If I compile a Class with Debug turned ON the size of the class file is larger than when I compile the class with NO Debug info.

Does this also mean - when a class compiled with Debug info - is loaded into the JVM - it takes that much more memory than its counterpart class - which is compiled with NO Debug.

Any help would be appreciated.
Thanks
Sumit
 
Ronnie Ho
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sopal Pal:
Hi
If I compile a Class with Debug turned ON the size of the class file is larger than when I compile the class with NO Debug info.

Does this also mean - when a class compiled with Debug info - is loaded into the JVM - it takes that much more memory than its counterpart class - which is compiled with NO Debug.


JVM doesn't load all the code from the class file into memory just when you start up the program. So you cannot measure it this way.
 
Tony William
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone then let us know what is the difference in using a class file that is compiled with Debug and with no debug? What I mean is the impact to the runtime environment.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
None whatsoever. The debugging info is some tables that are put into the .class file. The normal runtime JVM won't even load this data in -- only a debugger will.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic