Skip to Main Content
Java™ Performance and Scalability, Volume 1: Server-Side Programming Techniques
book

Java™ Performance and Scalability, Volume 1: Server-Side Programming Techniques

by Dov Bulka
June 2000
Intermediate to advanced content levelIntermediate to advanced
320 pages
5h 54m
English
Addison-Wesley Professional
Content preview from Java™ Performance and Scalability, Volume 1: Server-Side Programming Techniques

Chapter 6. Recycling

Regardless of continuous improvements in memory management speed, allocating and eventually discarding objects (via garbage collection) will always impose a nontrivial performance cost on Java programs. Moreover, object creation itself imposes an additional cost of properly setting the initial state of the constructed object via a constructor invocation. Object construction triggers the following steps [LY97]:

  1. Sufficient memory is allocated to hold all instance variables (object members) as well as those of each superclass.

  2. All instance variables of this class and those of each superclass are initialized to their default values (numeric variables to 0, boolean to false, reference types to null.)

  3. Proper values are assigned to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology

Greg Barish

Publisher Resources

ISBN: 0201704293Purchase book