Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Simple thumb rule for garbage collection in java is,</p> <ul> <li>Use memory cleanup techniques like cleaning up resources, members and instances when not needed.</li> <li>Close what you open. (W.R.T. connection, hibernate session etc...)</li> <li>Use buffering techniques while using file IO.</li> <li>Use new NIO instead of older File IO.</li> <li>Use <code>Collections</code> class from java utils for collection manipulations.</li> <li>Use Array when possible.</li> <li><p>Learn techniques specific to frameworks. Say in hibernate, do not use <code>ArrayList</code> for one-to-many relationships, because Lists are ordered so it will make extra column for children's ordering. Use <code>Set</code> instead.</p></li> <li><p>Do not use Hsql. Use some sort of relational database like postgres etc... HSQL will eat more memory. I have faced issues regarding this.</p></li> <li><p>Also keep in mind that when you using XML handling, do not use DOM when you just want to read small amount of data form XML. DOM will make whole structure of XML in memory, so will take more memory.</p></li> <li><p>Try not to keep objects in memory which will grow with time. Otherwise the applications can be out of memory.</p></li> <li><p>define sizes for your lists, maps etc...</p></li> <li><p>Just do not use any framework for small needs. If so then carefully check how you can tweak configurations for better and smaller heap area.</p></li> </ul> <p>Just calling <code>System.gc()</code> doen't free your memory and cleaning up objects.</p> <p>Guys, please add more details on this if i missed. So Others can check it out for better performance. thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload