Prism slows down web browser when showing a large XML file

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Unassigned
            Reporter:
            Kalle Niemitalo
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: