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

Optimize get log method

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      Follow-up issue for https://github.com/jenkinsci/jenkins/pull/2607

      > Current implementation of getLog(int maxLines) reads entire log file.
      In this PR I'm addressing this issue. Instead of reading all lines from start, I'm readying only maxLines from end of log.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Akbashev Alexander
          Path:
          core/src/main/java/hudson/model/Run.java
          core/src/test/java/hudson/model/RunTest.java
          http://jenkins-ci.org/commit/jenkins/2e8c3bec8ea150621ba0d01c8d44dc2b00b550bf
          Log:
          [FIXED JENKINS-39535] - Optimize get log method (#2607)

          • Add some tests to current behaviour of getLog method
          • getLog(maxLines) reads only last maxLines lines now

          It should speed up and reduce memory consumption for some plugins (i.e.
          Email-ext Plugin).
          Also now this method could be used to get last lines of build output in efficient manner.

          • Fix issues from code review
          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Akbashev Alexander Path: core/src/main/java/hudson/model/Run.java core/src/test/java/hudson/model/RunTest.java http://jenkins-ci.org/commit/jenkins/2e8c3bec8ea150621ba0d01c8d44dc2b00b550bf Log: [FIXED JENKINS-39535] - Optimize get log method (#2607) Add some tests to current behaviour of getLog method getLog(maxLines) reads only last maxLines lines now It should speed up and reduce memory consumption for some plugins (i.e. Email-ext Plugin). Also now this method could be used to get last lines of build output in efficient manner. Fix issues from code review

            People

            • Assignee:
              Unassigned
              Reporter:
              oleg_nenashev Oleg Nenashev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: