JDK-8005530 : [lcms] Improve performance of ColorConverOp for default destinations
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-12-27
  • Updated: 2018-03-21
  • Resolved: 2013-03-07
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 Other
8 b82Fixed openjdk7uFixed
Description
ColorConvertOp.createCompatibleDestImage() provides default destination image,
if user does not specify one. However, images created by this method often has
custom type and are not recognized by LCMSImageLayout. This results in processing
the color conversion in quite general way and causes a performance loss.
Benchmark results below demonstrate the problem:

Test(cmm.colorconv.ccop.op_img) took 2010ms for 351 reps
Test(cmm.colorconv.ccop.op_img) took 1964ms for 351 reps
Test(cmm.colorconv.ccop.op_img) took 1957ms for 351 reps
Test(cmm.colorconv.ccop.op_img) took 1958ms for 351 reps
Test(cmm.colorconv.ccop.op_img) took 1982ms for 351 reps
Test(cmm.colorconv.ccop.op_img) averaged 177.79353662242934 units/sec
    with 3BYTE_BGR, photo, 3BYTE_BGR, 250x250, CS_CIEXYZ
Test(cmm.colorconv.ccop.op_img) took 1920ms for 138 reps
Test(cmm.colorconv.ccop.op_img) took 1925ms for 138 reps
Test(cmm.colorconv.ccop.op_img) took 1913ms for 138 reps
Test(cmm.colorconv.ccop.op_img) took 1923ms for 138 reps
Test(cmm.colorconv.ccop.op_img) took 1942ms for 138 reps
Test(cmm.colorconv.ccop.op_img) averaged 71.70321105684299 units/sec
    with Compatible, photo, 3BYTE_BGR, 250x250, CS_CIEXYZ
Test(cmm.colorconv.ccop.op_img) took 1467ms for 1 reps
Test(cmm.colorconv.ccop.op_img) took 1525ms for 1 reps
Test(cmm.colorconv.ccop.op_img) took 1529ms for 1 reps
Test(cmm.colorconv.ccop.op_img) took 1482ms for 1 reps
Test(cmm.colorconv.ccop.op_img) took 1482ms for 1 reps
Test(cmm.colorconv.ccop.op_img) averaged 0.668002672010688 units/sec
    with 3BYTE_BGR, photo, 3BYTE_BGR, 4000x4000, CS_CIEXYZ
Test(cmm.colorconv.ccop.op_img) took 5718ms for 1 reps
Test(cmm.colorconv.ccop.op_img) took 5511ms for 1 reps
Test(cmm.colorconv.ccop.op_img) took 5476ms for 1 reps
Test(cmm.colorconv.ccop.op_img) took 5472ms for 1 reps
Test(cmm.colorconv.ccop.op_img) took 5509ms for 1 reps
Test(cmm.colorconv.ccop.op_img) averaged 0.1805966914686123 units/sec
    with Compatible, photo, 3BYTE_BGR, 4000x4000, CS_CIEXYZ

All test results:
Test(cmm.colorconv.ccop.op_img) averaged 177.79353662242934 units/sec
    with 3BYTE_BGR, photo, 3BYTE_BGR, 250x250, CS_CIEXYZ
Test(cmm.colorconv.ccop.op_img) averaged 71.70321105684299 units/sec
    with Compatible, photo, 3BYTE_BGR, 250x250, CS_CIEXYZ
Test(cmm.colorconv.ccop.op_img) averaged 0.668002672010688 units/sec
    with 3BYTE_BGR, photo, 3BYTE_BGR, 4000x4000, CS_CIEXYZ
Test(cmm.colorconv.ccop.op_img) averaged 0.1805966914686123 units/sec
    with Compatible, photo, 3BYTE_BGR, 4000x4000, CS_CIEXYZ

Comments
No new regression test: this fix results in performance change. CMM becnchmarks from J2DBench can be used for verification.
21-08-2013

LCMSImageLayout should accept component images which appropriate structure. This allows to process the color conversion in most efficient way. Suggested fix: http://cr.openjdk.java.net/~bae/8005530/webrev.00/
27-12-2012