This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Compile with Debug and with No Debug  RSS feed

 
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
Sheriff
Posts: 24217
38
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!