Groovy
  1. Groovy
  2. GROOVY-5086

XmlSlurper extremly slow when parsing HTML with DOCTYPE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.6.4, 1.8.2, 1.8.3
    • Fix Version/s: None
    • Component/s: XML Processing
    • Labels:
    • Environment:
      OSX 10.6, OSX 10.7, Ubuntu 10.04

      Description

      When parsing a XHTML document with a DOCTYPE declaration, the XMLSlurper parses for about two minutes. I reproduced this on several different groovy versions on OS X and Linux, but not using the groovy web console on appspot.com. This has also been encountered by some on the grails user mailing list earlier this year: http://grails.1312388.n4.nabble.com/XMLSlurper-really-slow-reading-parsing-html-xml-file-td3433305.html

      Minimal example to trigger this:

      new XmlSlurper().parseText('''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"><head><title>slurp</title></head><body /></html>''')

        Activity

        Christoph Neuroth created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Guillaume Laforge [ guillaume ]
        Resolution Won't Fix [ 2 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12734010 ] Default workflow, editable Closed status [ 12745827 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12970307 ] Default workflow, editable Closed status [ 12978091 ]

          People

          • Assignee:
            Guillaume Delcroix
            Reporter:
            Christoph Neuroth
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development