The following are some of the changes made to improve
the program execution speed and general runtime performance of
the Java 2 SDK and Java 2 Runtime Environment.
Links to relevant bug reports on the BugParade web site are provided
were applicable for further information.
Improved Performance for readUTF and writeUTF - The
implementations of the readUTF and writeUTF methods
of DataInputStream and DataInputStream
have been modified to improve performance. This is a fix for bug number
4219771 on the BugParade web site.
Improved Performance of JScrollPane Painting -
The implementation of JScrollPane has been improved so that it
does not cause excessive painting and screen flashing when
double buffering is not used.
Improved JTable Performance - The performance of the
JTable's column-handling functionality has been improved.
Previously, the performance of the operations of adding columns
or recalculating column widths did not scale well as the number
of columns became large. The implementation has been changed
to improve scalability. This is a fix for bug number
4223642 on the BugParade web site.
Paint Coalescing - Painting performance has been
enhanced through the implementation of an improved paint coalescing
algorithm. Areas
that require repainting are coalesced into a single,
non-rectangular repaint area as they are posted to the
event queue. This has the effect batching repaints,
executing multiple repaints simultaneously in a manner
more efficient than in previous releases.
Frame Resizing - Resizing of top-level frames has been
improved.
Internal Frame Blitting - By using Graphics.copyArea
calls, Swing's DefaultDesktopManager now needs to redraw far
less when frames are dragged.
Performance Enhancements in BigIntenger -
Class java.math.BigInteger has been reimplemented in pure
Java programming-language code. Previously, BigInteger's
implementation was based on the Plumb C library. The new
implementation performs all standard operations much faster
than the old implementation. The speed-up realized in the new
implemenation can be as much as 5x or more, depending on the
operation being performed.
Provision for Better-Performing Numeric Operations - The
Java 2 Platform now contains two classes which provide API for
performing general numeric operations.
java.lang.StrictMath - Class java.lang.StrictMath is a renaming of class
java.lang.Math from previous versions of the Java platform,
but otherwise retains the previous specification of Math.
In particular, it is defined to return bit-for-bit reproducible
results in all implementations.
java.lang.Math -
Class java.lang.Math provides the same set of API as does
class StrictMath. However, unlike some of the numeric functions of
class StrictMath, all implementations of the equivalent functions
of class Math are not defined to return the bit-for-bit same results,
but can vary within specified constraints.
This relaxation permits better-performing implementations where strict
reproducibility is not required.