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

Custom parsers in Warnings plugin extremely slow down Jenkins Web interface

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • warnings-plugin
    • None
    • Jenkins ver. 1.475, Warnings 4.13

      I created a dozen of custom parsers using Warnings plugin. After that Jenkins Web interface got extremely slow. It takes about 30 sec just to open my project from the Dashboard. "Configure project" takes about a minute to load.
      My regular expressions are for IBM XLC compiler and regular expressions are like that - "^\s*"?([^"])"?, line (\d).: (.) ((.)) (.*)$"

      The Groovy scripts are like:
      — groovy start —
      import hudson.plugins.warnings.parser.Warning
      import hudson.plugins.analysis.util.model.Priority

      Priority priority = Priority.NORMAL
      String fileName = matcher.group(1)
      String lineNumber = matcher.group(2)
      String category = matcher.group(3)
      String severity = matcher.group(4)
      if (severity == "U" || severity == "S" || severity == "E")
      priority = Priority.HIGH
      else if (severity == "W")
      priority = Priority.NORMAL
      else if (severity == "I")
      priority = Priority.LOW

      String message = matcher.group(5)

      category = category + " " + message
      .replaceAll("extern \"C\"", "extern C")
      .replaceAll("[\"'][^\"]*[\"']", "X")
      .replaceAll("
      d+ ", " N ")
      .replaceAll(" \\d+
      .", " N.")

      final int MAX_LEN = 128
      if (category.length() > MAX_LEN)
      category = category.substring(0, MAX_LEN-1)

      return new Warning(fileName, Integer.parseInt(lineNumber), "XLC Compiler", category, message, priority);
      — groovy end —

        1. dump.txt
          60 kB
        2. dump2.txt
          97 kB

            drulli Ulli Hafner
            agvozdev Andrew Gvozdev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: