JDK-8078464 : Path2D storage growth algorithms should be less linear
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-04-22
  • Updated: 2016-11-06
  • Resolved: 2015-04-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u60Fixed 9 b65Fixed
Related Reports
Relates :  
Description
A significant amount of time is spent allocating and copying arrays when a Path2D is grown to a large number of path elements.  The current growth algorithm is linear, but other growable storage objects use a progressive growth algorithm that increases the number of new elements as the capacity grows.
Comments
Note on the new growth algorithm: Before: grow = min(size, EXPAND_MAX) so for large arrays, grow = EXPAND_MAX = 500 (linear) ! After: grow = size if (grow > EXPAND_MAX) grow = max(EXPAND_MAX, size / 8) so for large arrays, grow = size / 8 (log)
29-04-2015