FULL PRODUCT VERSION :
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 :
The HTML being parsed in a few seconds.
The HTML being parsed, but you have to get a cup of coffee before it is done (5-7 minutes on my machine).
This bug can be reproduced always.