JDK-8089346 : 8.0-controls-scrum-749: up to 55% performance regression in Controls.TextArea.v_scroll-255x1000-wrap
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2013-09-10
  • Updated: 2016-06-02
  • Resolved: 2016-06-02
Related Reports
Relates :  
Relates :  
Description
There is up to 55% performance regression in Controls.TextArea.v_scroll-255x1000-wrap in build 8.0-b106.
The regression first appeared in build 8.0-controls-scrum-749 which contains:
   1. RT-31901 - Regression: scrollbar issue with TitledPane
   2. RT-32654 : ScrollPane - remove DOS line endings, no code changed

JPA profiles show the time spent in javafx.scene.Scene.doLayoutPass() has been
increased from 0,148 sec to 26,760 sec (total test time is 30 secs). This is because
most of the time is now spent in com.sun.javafx.scene.control.skin.ScrollPaneSkin.layoutChildren.


Steps to run Controls.TextArea.v_scroll-255x1000-wrap
> cd JFX_WS/tests/performance/Controls/
> ant
> java -Djavafx.animation.fullspeed=true
        -cp "JFX_HOME/rt/lib/ext/jfxrt.jar;./dist/Controls.jar;../FXBenchmark/dist/FXBenchmark.jar;../../../import/benchmarks-2.1.1/benchmarks-2.1.1.jar"
       jrockit.bm.Main controls.bm.TextAreaBenchmark -i 1 -wt 0 -tr 60 -line-len 255 -line-num 1000 -mode V_SCROLL -wrap-text true 

Comments
This issue is a historical performance regression that never had its root cause identified. Given the amount of time that has passed I think we should close this issue as "won't fix", as it is highly unlikely that the issue, if it exists, will be easily found.
30-11-2015

We are out of time to look at this. Since no one has come back with a compelling reason why this cannot be deferred, we would like to defer it.
20-11-2013

It is quite possible that this performance regression will change again with the webrev that will be pushed for RT-34219 (which undoes much of the changes from RT-31901 which introduced this regression in the first place). I'm not sure if the performance will improve or get worse though...
14-11-2013

Katya, what is the performance comparison with FX 2.2? Is it critical issue? What is your opinion if we can defer it?
12-11-2013

This issue needs more investigation than time allows right now. Requesting deferral into next release.
06-11-2013

Thanks for clarifying. Your initial description suggested the regression was in two changesets: 1. RT-31901 - Regression: scrollbar issue with TitledPane (http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/3f656fbd508f) 2. RT-32654 : ScrollPane - remove DOS line endings, no code changed (http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/18a02cf34ddf) I would have to hope that the second changeset is true to its word and doesn't actually change any code, in which case the regression must be in issue one. When I back out the two line change to ScrollPaneSkin however, I see only a very minimal change (e.g. 10.4 FPS before to 10.6 FPS after). My gut feeling is that we should do something like what is shown in the patch below. This effectively batches up changes so they are done once per layout, not once per layout request. However, I have not yet had a chance to benchmark this and test for regressions. I will do that when time permits (but in any case, it is unlikely to yield a great return than the backout test I already did which only yielded 0.2 FPS extra). diff --git a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java --- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java +++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java @@ -267,12 +267,12 @@ @Override public void requestLayout() { // if scrollNode requested layout, will want to recompute nodeSizeInvalid = true; - updateVerticalSB(); - updateHorizontalSB(); super.requestLayout(); // add as layout root for next layout pass } @Override protected void layoutChildren() { if (nodeSizeInvalid) { + updateVerticalSB(); + updateHorizontalSB(); computeScrollNodeSize(getWidth(),getHeight()); } if (scrollNode != null && scrollNode.isResizable()) {
05-11-2013

Sorry, I missed "jrockit.bm.Main controls.bm.TextAreaBenchmark". Full cmd should be: java -Djavafx.animation.fullspeed=true -cp "../../../artifacts/sdk/rt/lib/ext/jfxrt.jar;./dist/Controls.jar;../FXBenchmark/dist/FXBenchmark.jar;../../. ./import/benchmarks-2.1.1/benchmarks-2.1.1.jar" jrockit.bm.Main controls.bm.TextAreaBenchmark -i 1 -wt 0 -tr 60 -line-len 255 -line-num 1000 -mode V_SCROLL -wrap-text true
05-11-2013

I'm unable to run the benchmark. When I try, I get the following error: java -Djavafx.animation.fullspeed=true -cp "../../../artifacts/sdk/rt/lib/ext/jfxrt.jar;./dist/Controls.jar;../FXBenchmark/dist/FXBenchmark.jar;../../. ./import/benchmarks-2.1.1/benchmarks-2.1.1.jar" controls.bm.TextAreaBenchmark -i 1 -wt 0 -tr 60 -line-len 255 -line-num 1000 -mode V_SCROLL -wrap-text true Error: Main method not found in class controls.bm.TextAreaBenchmark, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application Do you have any pointers? Should I just add in a main method?
05-11-2013

Do we have a score for this from late May / early June?
11-09-2013