United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6891551 Font rasterisation uses more heap than needed for some strikes.
JDK-6891551 : Font rasterisation uses more heap than needed for some strikes.

Details
Type:
Bug
Submit Date:
2009-10-14
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
We can use can use smaller strike segments in the font cache resulting in
less heap being used in most cases.

                                    

Comments
EVALUATION

We can reduce the size of a segment from 256 to 32 glyph pointers.
This reduces the amount of storage for a segment from 1024 to 128 bytes.
There is an increased number of segment pointers but for this is insignficant in
almost all fonts which have less < 1000 glyphs.

This will help even more in 64 bit VMs, reducing the minimum storage from
2048 to 256 bytes. Also I suspect that 64 bit compressed pointers mean the
additional int[] references are smaller than they'd otherwise be so the
increased number there won't matter.

For some transformed strikes that are ephemeral and use very
few glyphs eg rotation animations, it might be worthwhile starting
with a pair of very small sparse arrays, one of int for composite strikes, or
char for physical strikes, one of int (for 32 bit VM) and long (for 64 bit VM)
and grow this or transition it to the segments once it hits some number of
glyphs. What values are chosen should use about the same storage as the
simpler scheme for the case where only a single glyph is used. Growing
shouldn't happen too often as it would create the garbage we are trying to avoid.
                                     
2009-10-14
EVALUATION

http://hg.openjdk.java.net/jdk7/build/jdk/rev/417acb7e8fa1
                                     
2011-01-17



Hardware and Software, Engineered to Work Together