JDK-8149537 : JavaFX WebView performance regression when inserting html via javascript
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u60,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-02-10
  • Updated: 2016-06-08
  • Resolved: 2016-03-10
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 JDK 9
8u102Fixed 9Fixed
Related Reports
Relates :  
Description
JavaFX WebView performance regression when inserting html via javascript.

3-4x performance decrease is observed from 8u51 to 8u60 or later.
Comments
Changeset: 4166cbca577f Author: arajkumar Date: 2016-03-09 18:58 -0800 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/4166cbca577f
10-03-2016

I did a test build on Oracle Linux 6 (since there were Makefile changes) and it builds and runs fine. +1
10-03-2016

+1
09-03-2016

[~arajkumar] i guess you need to take this patch also : http://trac.webkit.org/changeset/166706 - Crash after mutating after pseudo style (though i did not tried to reproduce this issue since i don't have access to https://bugs.webkit.org/show_bug.cgi?id=130881 ) Since patch 166706 fixed the crash in styleresolvetree.cpp on top of the changes that you merged as part of this bug fix, i feel better to take this changeset.
09-03-2016

Thanks @Murali. I could reproduce the crash using the DRT case, indeed it is a regression. Fixed the same in the new webrev: http://cr.openjdk.java.net/~arajkumar/8149537/webrev.04. Please take a look.
09-03-2016

http://cr.openjdk.java.net/~arajkumar/8149537/webrev.03 New webrev fixes linker error in OSX builds. @Guru, @Kevin, Please take a look.
03-03-2016

Revision number ordered cherry-pick: http://cr.openjdk.java.net/~arajkumar/8149537/webrev.02 Addresses most of the review comments except OSX build failure. Looking into that.
01-03-2016

Thanks @Guru, find my inline comments, >>w.r.t to webrev.01/ >>TargetJava.pri >>Changes on this file not required , I could compile without these changes (On Linux, GCC 4.9.3, ld 1.11, If this is required on GCC 4.8.x then ignore this comment) I added intentionally to catch any undefined symbols at the linking time. Otherwise it would be difficult to find those details from dynamic linker. I agree with you, it is not required for the final changeset, but nothing harm to have this. >> StyleResolver.cpp >> 94 #include "PseudoElement.h" //not required, Initially added in 165465 and pseudoelement usage is removed at 165542 but header was left in the trunk. Will remove it in the next webrev. >> Element.h >> http://trac.webkit.org/changeset/165542 >> PassRef<RenderStyle> styleForRenderer(); //not removed Will remove it in the next webrev. >> StyleResolveTree.cpp >> 750 newStyle = styleForElement(current, *renderingParentNode.renderStyle()); >> Supposed to be newStyle = styleForElement(current, renderingParentNode); //w.r.t 166303 I suspect the cherry-pick order. I will try cherry-picking sequentially. But functionality is identical in both the cases. >>>None of the change set (all 6 mentioned in earlier comment) which is merged caused a regression in webkit.org. >>>Note (Only Info) : http://trac.webkit.org/changeset/165465 -- https://bugs.webkit.org/show_bug.cgi?id=130091 is still open Till today. Either their (webkit) bugzilla is not updated or this >>>changeset could be a un-reviewed one. Or still improvement needed !. This note applies even with new Webkit Merge. >>>Will run DRT with this patch and update the results. >>>OS X : Compilation failure : (Changed done on TargetJava.pri is required on mac* as well) >>>Undefined symbols for architecture x86_64: >>> "WebCore::Node::renderStyle() const", referenced from: >>> WebCore::MediaQueryMatcher::prepareEvaluator() const in MediaQueryMatcher.o >>> WebCore::StyleMedia::matchMedium(WTF::String const&) const in StyleMedia.o >>> WebCore::HTMLTitleElement::textWithDirection() in HTMLTitleElement.o >>> ld: symbol(s) not found for architecture x86_64 I never tried on OSX. Will setup a build and fix these issues.
01-03-2016

Once Guru has finished review and testing, I can test the final proposed webrev, too. I want to make sure it can compile on Oracle Linux 6 which is what we use for JDK 8u builds.
01-03-2016

w.r.t to webrev.01/ TargetJava.pri Changes on this file not required , I could compile without these changes (On Linux, GCC 4.9.3, ld 1.11, If this is required on GCC 4.8.x then ignore this comment) StyleResolver.cpp 94 #include "PseudoElement.h" //not required, Initially added in 165465 and pseudoelement usage is removed at 165542 but header was left in the trunk. Element.h http://trac.webkit.org/changeset/165542 PassRef<RenderStyle> styleForRenderer(); //not removed StyleResolveTree.cpp 750 newStyle = styleForElement(current, *renderingParentNode.renderStyle()); Supposed to be newStyle = styleForElement(current, renderingParentNode); //w.r.t 166303 None of the change set (all 6 mentioned in earlier comment) which is merged caused a regression in webkit.org. Note (Only Info) : http://trac.webkit.org/changeset/165465 -- https://bugs.webkit.org/show_bug.cgi?id=130091 is still open Till today. Either their (webkit) bugzilla is not updated or this changeset could be a un-reviewed one. Or still improvement needed !. This note applies even with new Webkit Merge. Will run DRT with this patch and update the results. OS X : Compilation failure : (Changed done on TargetJava.pri is required on mac* as well) Undefined symbols for architecture x86_64: "WebCore::Node::renderStyle() const", referenced from: WebCore::MediaQueryMatcher::prepareEvaluator() const in MediaQueryMatcher.o WebCore::StyleMedia::matchMedium(WTF::String const&) const in StyleMedia.o WebCore::HTMLTitleElement::textWithDirection() in HTMLTitleElement.o ld: symbol(s) not found for architecture x86_64
29-02-2016

One more changset need to be cherry picked to fix printing related DRT failure. http://trac.webkit.org/changeset/165557 http://trac.webkit.org/changeset/165561 New webrev with above mentioned changesets: http://cr.openjdk.java.net/~arajkumar/8149537/webrev.01/ @Kevin, @Alexander, @Guru, Please review the patch.
29-02-2016

http://cr.openjdk.java.net/~arajkumar/8149537/webrev.00/ Basic testing has been executed on Linux 64bit Ubuntu.
29-02-2016

Following upstream patches has been backported to our downstream WebKit branch, http://trac.webkit.org/changeset/165465 http://trac.webkit.org/changeset/165542 http://trac.webkit.org/changeset/166173 http://trac.webkit.org/changeset/166303 Corresponding patches with conflicts resolved. http://cr.openjdk.java.net/~arajkumar/8149537/upstream/0001-Don-t-use-NodeRenderingTraversal-for-pseudo-elements.patch http://cr.openjdk.java.net/~arajkumar/8149537/upstream/0002-Invalidate-sibling-text-node-style-when-needed-inste.patch http://cr.openjdk.java.net/~arajkumar/8149537/upstream/0003-Render-tree-construction-is-O-N-2-in-number-of-sibli.patch http://cr.openjdk.java.net/~arajkumar/8149537/upstream/0004-Remove-StyleResolver-State-m_parentNode.patch http://cr.openjdk.java.net/~arajkumar/8149537/upstream/0005-Add-missing-functions-for-r166303.patch
29-02-2016

Guru and Murali will transfer info to Arunprasad
24-02-2016

Murali from IDC-Dev is working on this.
21-02-2016