JDK-8169294 : JavaFX Path2D storage growth algorithms should be less linear
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-11-06
  • Updated: 2016-11-09
  • Resolved: 2016-11-09
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 9
9Fixed
Related Reports
Relates :  
Relates :  
Description
JavaFX Path2D has the same growth algorithm as java2d that was fixed in JDK9 (backported in JDK8).

For large paths, the growing factor is limited to 1000 so it leads to lots of array resizes (new array + copy) !
Comments
Changeset: 9402122c6b43 Author: lbourges Date: 2016-11-09 14:57 -0800 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/9402122c6b43 8169294: JavaFX Path2D storage growth algorithms should be less linear Reviewed-by: flar, kcr
09-11-2016

Sorry, +1 implied from mailing list...
09-11-2016

Sure. Jim or I will push it.
09-11-2016

I think Jim approved the fix on the mailing list, as I started a review thread directly before reading OpenJFX guidelines. Anyway could you push the fix for me as I am only a committer on the OpenJDK9 client repository ?
09-11-2016

Looks good to me. +1 (pending Jim's review of the fix itself)
09-11-2016

Here is the updated webrev: http://cr.openjdk.java.net/~lbourges/fx/path2D-8169294.1/ I fixed the test according to kevin's comments.
09-11-2016

Jim can review the patch. Here are my comments on the test. 1. The license header is missing the classpath exception -- you can copy it from one of the other files (e.g., Path2D.java). Also, please add a blank line between the copyright header and the package statement. 2. I ran the test and can see the expected difference in performance (with gradle --info). Given how dramatic the performance hit is, I recommend adding a 10 second timeout which is enough to cause the test to fail on my machine (and would fail with your provided results, as well), and would comfortably pass with the fix. This will make it a better regression test.
09-11-2016

Webrev: http://cr.openjdk.java.net/~lbourges/fx/path2D/
09-11-2016