Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-73298

Prism slows down web browser when showing a large XML file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • prism-api-plugin
    • Jenkins 2.452.1
      Prism API Plugin Version 1.29.0-15
      Warnings Plugin Version 11.3.0
      Firefox 11.51.0esr

      A build reports warnings on eight lines of a largish XML file (7246 lines, 1907943 bytes), and the Warnings Plugin displays those warnings in a table. When I click the first warning (on line 950 of the file), the Warnings Plugin attempts to display the XML file and scroll to the corresponding line.

      It takes longer than one minute before the line and the warning become visible. Even then, the subsequent lines of the file are not visible, and the Process Manager of Firefox shows that the tab is using 98% of CPU time and gradually accumulating memory (I saw 15 GB). I run the five-second profile from the Process Manager and it shows the time is being spent this call stack:

      • 10% get Node.childNodes
      • 33% /jenkins/static/3da8a64b/plugin/prism-api/js/prism/keep-markup/prism-keep-markup.min.js:1:752
      • 72% /jenkins/static/3da8a64b/plugin/prism-api/js/prism/keep-markup/prism-keep-markup.min.js:1:752
      • 91% /jenkins/static/3da8a64b/plugin/prism-api/js/prism/keep-markup/prism-keep-markup.min.js:1:752
      • 92% /jenkins/static/3da8a64b/plugin/prism-api/js/prism/keep-markup/prism-keep-markup.min.js:1:752
      • 92% (root scope) /jenkins/static/3da8a64b/plugin/prism-api/js/prism/keep-markup/prism-keep-markup.min.js:1:1403
      • 92% forEach [self-hosted:203:21]
      • 92% run /jenkins/static/3da8a64b/plugin/prism-api/js/prism/prism-core.min.js:1:4368
      • 100% setTimeout handler

      I hope there is a way to make this faster; perhaps by disabling syntax highlighting in large files, or by showing only a dozen lines around the warning.

            Unassigned Unassigned
            kon Kalle Niemitalo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: