JDK-8089046 : 8.0-graphics-scrum-2004: up to 60% performance regressions in Controls.TextArea.v_scroll-wrap
  • Type: Bug
  • Component: javafx
  • Sub-Component: scenegraph
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2013-12-04
  • Updated: 2016-06-02
  • Resolved: 2016-06-02
Related Reports
Relates :  
Description
There is up to 60% performance regression in Controls.TextArea.v_scroll-255x1000-wrap in promoted build fx8.0-b118. This regression was actually introduced in 8.0-graphics-scrum-2004 which contains:
    1. Fix to RT-34305: Remove old non working anti-aliasing code
       This is a low risk fix. Passed clean, build and sanity testing.
       Post Commit Reviewers: kcr and vadim ��� Chien Yang / detail
    2. RT-33776 : [2d traversal] Focus indicator moves to unexpected place
       Reviewed by: jgiles

    3. This commit contains refactoring and code cleanup before the actual fix. ��� Martin Sladecek / detail
       RT-34219: fixed TextArea's scrollbar after deleting its content.
       Reviewed-by: Jonathan. ��� Pavel Safrata / detail

JPA profiles show that the time spent in Scene.doLayoutPass() was increased from 
0.173 sec to 26.690 sec (total run time was 30 sec). This is because we now spend
19.434 sec in com.sun.javafx.scene.control.skin.ScrollPaneSkin.layoutChildren() and
 7.215 sec in com.sun.javafx.scene.control.skin.TextAreaSkin.layoutChildren().

So, looks like the regression is caused by "RT-34219: fixed TextArea's scrollbar after deleting its content."

Note, the regression is observed on all platforms including Windows and MacOS.
On Windows the regression is better noticed in SW pipeline.

Steps to run Controls.ListView-Keyboard
> 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
I'm resolving this issue as "Won't Fix" based on Martin's evaluation. We will look into optimizing scroll wrap case if we receive request from user with real apps.
25-06-2015

Kevin, what should I do with this bug? It has not been deferred by SQE, should I wait or can I move it to "9"?
10-12-2013

I examined the changed pushed by Pavel and I think the regression is inevitable. We need to relayout the whole ScrollPane(Skin) when the content changes because we need to update scrollbar's visibility. Previously, this was just not done. Later, we can try to optimize the layoutChildren so that only the scrollbar visibility is updated in such cases.
05-12-2013

yes, it impacted only wrapped text based benchmark.
05-12-2013

Katya: does this affect just the one test? Martin: Is this performance failure expected?
05-12-2013