- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
  P3                     
     - 
    Affects Version/s: 8, 9
 - 
    Component/s: client-libs
 
- 
        b124
 - 
        x86_64
 - 
        windows_7
 
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8163668 | 8u121 | Mikhail Cherkasov | P3 | Resolved | Fixed | b01 | 
| JDK-8156947 | 8u112 | Mikhail Cherkasov | P3 | Resolved | Fixed | b01 | 
| JDK-8167794 | emb-8u121 | Mikhail Cherkasov | P3 | Resolved | Fixed | b01 | 
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
Parsing an HTML-page containing large scripts (with comments) is painfully slow after updating to Java 8.
Parsing a page that took <1s before now takes >5minutes!
Looking at the difference between Jav 7 and Java 8 versions the culprit is most likely the "optimization" added. (Adding 'insideComment' and keeping it up to date by repeatedly copying the whole string looks like a *very* bad idea).
REGRESSION. Last worked in version 7u80
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Code inspection should be enought to see that this is an issue.
But otherwise prepare a Parser.parse request targeting for example http://site.soccer.betfair.com/Menu.do?timeZone=Europe/Stockholm®ion=GBR&brand=betfair&locale=sv
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The HTML being parsed in a few seconds.
ACTUAL -
The HTML being parsed, but you have to get a cup of coffee before it is done (5-7 minutes on my machine).
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
 - 
                    
JDK-8156947 javax.swing.text.html.parser.Parser parseScript incorrectly optimized
-         
     - Resolved
 
 -         
 - 
                    
JDK-8163668 javax.swing.text.html.parser.Parser parseScript incorrectly optimized
-         
     - Resolved
 
 -         
 - 
                    
JDK-8167794 javax.swing.text.html.parser.Parser parseScript incorrectly optimized
-         
     - Resolved
 
 -         
 
- relates to
 - 
                    
JDK-8284886 javax/swing/text/html/parser/Parser/8078268/bug8078268.java is empty 8u
-         
     - Resolved
 
 -         
 - 
                    
JDK-8242883 Incomplete backport of JDK-8078268: backport test part
-         
     - Resolved
 
 -         
 - 
                    
JDK-8264526 javax/swing/text/html/parser/Parser/8078268/bug8078268.java timeout
-         
     - Resolved
 
 -         
 - 
                    
JDK-8284884 Replace polling with waiting in javax/swing/text/html/parser/Parser/8078268/bug8078268.java
-         
     - Resolved
 
 -         
 - 
                    
JDK-7011777 JDK 6 parses html text with script tags within comments differently from previous releases
-         
     - Closed
 
 -         
 - 
                    
JDK-8014936 JDK 6 parses html text with script tags within comments differently from previous releases
-         
     - Resolved
 
 -