• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      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.

          [JENKINS-39535] Optimize get log method

          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

          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

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

              Created:
              Updated:
              Resolved: