-
Task
-
Resolution: Not an Issue
-
P3
-
8
-
os_x
This is the performance regression on HiDPI displays after the fix JDK-8011059
See http://mail.openjdk.java.net/pipermail/awt-dev/2013-October/006241.html
On 10/29/2013 11:08 PM, Sergey Bylokhov wrote:
> The fix looks fine to me in general. But there is at least one issue. I build you fix and test it:
> - Consuming of cpu increased by 500 times Java2Demo on images tab.
> - FPS is dropped from 220(jdk8)/35(jdk7u40) to 15 in guimark2. Note that jdk6 has the same FPS(15) on my system.
The main problem is that the Image.SCALE_DEFAULT hint is used to retrieve a scaled image from Image.getScaledInstance() method.
It always uses the ReplicateScaleFilter for images which getScaledInstance() method has not been overridden.
The ReplicateScaleFilter creates a lot of arrays and consumes the CPU during the image parsing.
The better fix is to introduce the new Image.SCALE_CUSTOM hint which can be used to get a scaled image and does not use filters by default.
See http://mail.openjdk.java.net/pipermail/awt-dev/2013-October/006241.html
On 10/29/2013 11:08 PM, Sergey Bylokhov wrote:
> The fix looks fine to me in general. But there is at least one issue. I build you fix and test it:
> - Consuming of cpu increased by 500 times Java2Demo on images tab.
> - FPS is dropped from 220(jdk8)/35(jdk7u40) to 15 in guimark2. Note that jdk6 has the same FPS(15) on my system.
The main problem is that the Image.SCALE_DEFAULT hint is used to retrieve a scaled image from Image.getScaledInstance() method.
It always uses the ReplicateScaleFilter for images which getScaledInstance() method has not been overridden.
The ReplicateScaleFilter creates a lot of arrays and consumes the CPU during the image parsing.
The better fix is to introduce the new Image.SCALE_CUSTOM hint which can be used to get a scaled image and does not use filters by default.