JDK-8200239 : Indeterminate JavaFX ProgressBar uses too much GPU
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8u91
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: x86
  • Submitted: 2018-03-23
  • Updated: 2019-01-11
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.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) Client VM (build 25.91-b14, mixed mode)

EXTRA RELEVANT SYSTEM CONFIGURATION :
GPU Hardware acceleration is enabled,
core i7-6700, intel HD 530.



A DESCRIPTION OF THE PROBLEM :
An animated ProgressBar in JavaFX, with the status "indeterminate", uses an absurd amount of CPU/GPU load.

Same problem as reported here
https://bugs.openjdk.java.net/browse/JDK-8102571
but it is still not fixed in current versions.



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Show a JavaFX ProgressBar with .setProgress(-1).



EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
GPU load  ~1%.
ACTUAL -
GPU load > 20%.

REPRODUCIBILITY :
This bug can be reproduced always.


Comments
Additional information from Submitter: ------------------------------------------------------- I performed the test case on JDK 10 (10+46) and JDK 11 (11-ea+5). In both cases the indeterminate ProgressBar is not animated anymore, thus not using any CPU/GPU at all. The high load occured in previous versions mostly on the GPU, not the CPU. In this minimal test case on JDK 9 (where it is animated), the GPU load is constantly between 8% and 12%, with some additional percentages contributed by the Windows process "Desktop Windows Manager". -------------------------------------------------------
27-03-2018

It looks like there is a separate bug in JDK 10 (a regression) where the progress bar will not animate if the root is a Group node. If you change the root node to a StackPane or other layout container, then it will animate again. I will file a new bug for this. As for the performance problem, I don't see evidence of a bug, but we can evaluate it.
27-03-2018

Prepared test case based on bug description and checked in my system ( - Intel(R) Core(TM) i5-6300U CPU @2.40 GHz.) using Resource Monitor utility of Windows Average percent of CPU consumption (Windows 10, 64-bit) : 8u172 : Average percent of CPU consumption is initially ~13%, which decreases to ~3% after 1 minute. 10+46 : Average percent of CPU consumption is initially ~12%, which decreases gradually to 0.02% after 1 minute. 11-ea+6 : same as 10+46. When checked with 32-bit JDK 8u144, Average percent of CPU consumption is ~3% .
26-03-2018