Web Hosting Java, JSP, Tomcat 6, J2EE, Servlets, Struts, Jboss
Optimization 38: Last In, First Out On multithreaded
October 30, 2006 on 2:37 pm | In Java |Key Points . Object creation could be expensive. It includes the cost of memory allocation and initialization of the object’s direct instance variables as well as those instance variables inherited from each and every superclass. . Object destruction is performed implicitly as part of garbage collection. Like creation, object destruction is not free. It contributes to the overall cost of garbage collection. . Many class implementations provide a reset operation to restore an object to its initial state. Often, this is much more economical than polluting the code with new objects. It also lightens the load on garbage collection. . Recycling a single object is a special case of an object pool of size 1. It is the simplest and fastest recycling mechanism. Otherwise, if you cannot tell in advance how many objects are required during execution, you can still tap into the benefits of recycling by using object pools. . In the special case of a thread pool, it is more efficient to enforce a LIFO policy to better utilize the system’s limited cache and memory space. Page 143
Hint: If you are looking for very good and affordable webspace to host and run your j2ee hosting application check Virtualwebstudio j2ee web hosting services
No Comments yet
Sorry, the comment form is closed at this time.
...I
just wanted to take the time to say "Thank you!" for our new webmail
system. It's great! Thanks for taking such good care of us.
Thanks
for helping me out. Just for the record, Webhostingjava.net has been a great
web host! So far your support and handling of questions has far
exceeded that of a "larger web hosting company".
I
would like to thank you for helping me with my domain...You have
shown me great patience and professionalism. I would not hesitate to
recommend you to my clients.