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

Add a checkbox to disable the mercurial changelog calculation

    Details

    • Similar Issues:

      Description

      When polling a lot of changes it takes very long time for mercurial to generate the changelog. In some cases we care about what was changed but in most of the cases when running test builds for example or when changing branches for testing purposes we do not care about what changes were made.

      This will result in much quicker build times.

      It will be really nice to have a "Determine changes" checkbox in the plugin settings that will allow to enable/disable the changelog calculation.

        Attachments

          Activity

          Hide
          jglick Jesse Glick added a comment -

          If you do not need the changelog calculation, why are you using the plugin at all? Just add a shell build step

          if [ -d .hg ]; then hg pull -u; else hg clone … .; fi
          

          I guess the plugin can be useful for more exotic features like repository caching and (in the future) Credentials integration, but for most jobs its only real purpose is making the changelog.

          Also I wonder what kinds of repositories make changelog generation slow to begin with. You need to pull the new changesets anyway, so the overhead is just running a certain log operation. It is possible there are avoidable inefficiencies in the options passed to this command.

          Show
          jglick Jesse Glick added a comment - If you do not need the changelog calculation, why are you using the plugin at all? Just add a shell build step if [ -d .hg ]; then hg pull -u; else hg clone … .; fi I guess the plugin can be useful for more exotic features like repository caching and (in the future) Credentials integration, but for most jobs its only real purpose is making the changelog. Also I wonder what kinds of repositories make changelog generation slow to begin with. You need to pull the new changesets anyway, so the overhead is just running a certain log operation. It is possible there are avoidable inefficiencies in the options passed to this command.
          Hide
          celltestr celltestr added a comment -

          We used to use the shell to handle the repo checkout but we found it to be not so reliable and sometimes slower than the plugin.
          Also we are checking out multiple repo's and it's much easier to maintain using the multi repo chekcout plugin.

          We have ~300k files in the repo with changes that affect thousands of files.. Now when changing the branch to a (very) old branch you get massive calculation.. There was an old defect which is kinda related (JENKINS-12829) that is now fixed but when we used to hit that bug it took 8+ hours to calculate the changes.

          We are no longer seeing this specific problem but the calculation can take good half an hour in some cases with the current version of the plugin.

          We are trying to speed up our build process and this is one of things that can make a big difference for us.

          Show
          celltestr celltestr added a comment - We used to use the shell to handle the repo checkout but we found it to be not so reliable and sometimes slower than the plugin. Also we are checking out multiple repo's and it's much easier to maintain using the multi repo chekcout plugin. We have ~300k files in the repo with changes that affect thousands of files.. Now when changing the branch to a (very) old branch you get massive calculation.. There was an old defect which is kinda related ( JENKINS-12829 ) that is now fixed but when we used to hit that bug it took 8+ hours to calculate the changes. We are no longer seeing this specific problem but the calculation can take good half an hour in some cases with the current version of the plugin. We are trying to speed up our build process and this is one of things that can make a big difference for us.
          Hide
          blt04 Brandon Turner added a comment -

          Here's a potential fix for this: https://github.com/jenkinsci/mercurial-plugin/pull/52

          We use the caching features of the Mercurial plugin. The plugin is also much easier to use than managing shell scripts in jobs. We suffer from large changelog calculation times given the size of our repo. I'd be very grateful to see this land.

          Show
          blt04 Brandon Turner added a comment - Here's a potential fix for this: https://github.com/jenkinsci/mercurial-plugin/pull/52 We use the caching features of the Mercurial plugin. The plugin is also much easier to use than managing shell scripts in jobs. We suffer from large changelog calculation times given the size of our repo. I'd be very grateful to see this land.
          Hide
          blt04 Brandon Turner added a comment -

          Another try, based on Jesse's comments: https://github.com/jenkinsci/mercurial-plugin/pull/53

          Show
          blt04 Brandon Turner added a comment - Another try, based on Jesse's comments: https://github.com/jenkinsci/mercurial-plugin/pull/53
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Brandon Turner
          Path:
          src/main/java/hudson/plugins/mercurial/MercurialSCM.java
          src/main/resources/hudson/plugins/mercurial/MercurialSCM/config.jelly
          src/main/resources/hudson/plugins/mercurial/MercurialSCM/help-disableChangeLog.html
          src/test/java/hudson/plugins/mercurial/DisableChangeLogTest.java
          http://jenkins-ci.org/commit/mercurial-plugin/b9d53cbc998b736fa206585dc276550234cbbaa1
          Log:
          Add option to disable changelog calculation

          In some very very large repositories, the changelog calculation can take
          quite a bit of time. For users that do not care about seeing the
          changelog in Jenkins, this allows disabling the calculation, thus
          speeding up builds.

          JENKINS-16654

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Brandon Turner Path: src/main/java/hudson/plugins/mercurial/MercurialSCM.java src/main/resources/hudson/plugins/mercurial/MercurialSCM/config.jelly src/main/resources/hudson/plugins/mercurial/MercurialSCM/help-disableChangeLog.html src/test/java/hudson/plugins/mercurial/DisableChangeLogTest.java http://jenkins-ci.org/commit/mercurial-plugin/b9d53cbc998b736fa206585dc276550234cbbaa1 Log: Add option to disable changelog calculation In some very very large repositories, the changelog calculation can take quite a bit of time. For users that do not care about seeing the changelog in Jenkins, this allows disabling the calculation, thus speeding up builds. JENKINS-16654
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/plugins/mercurial/MercurialSCM.java
          src/main/resources/hudson/plugins/mercurial/MercurialSCM/config.jelly
          src/main/resources/hudson/plugins/mercurial/MercurialSCM/help-disableChangeLog.html
          src/test/java/hudson/plugins/mercurial/DisableChangeLogTest.java
          http://jenkins-ci.org/commit/mercurial-plugin/5514d2d294542ae4fe0a9bc5cb3356fecfb056c9
          Log:
          Merge pull request #53 from blt04/disable-changelog2

          [FIXED JENKINS-16654] Add option to disable changelog calculation

          Compare: https://github.com/jenkinsci/mercurial-plugin/compare/03c6acd8d71c...5514d2d29454

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/mercurial/MercurialSCM.java src/main/resources/hudson/plugins/mercurial/MercurialSCM/config.jelly src/main/resources/hudson/plugins/mercurial/MercurialSCM/help-disableChangeLog.html src/test/java/hudson/plugins/mercurial/DisableChangeLogTest.java http://jenkins-ci.org/commit/mercurial-plugin/5514d2d294542ae4fe0a9bc5cb3356fecfb056c9 Log: Merge pull request #53 from blt04/disable-changelog2 [FIXED JENKINS-16654] Add option to disable changelog calculation Compare: https://github.com/jenkinsci/mercurial-plugin/compare/03c6acd8d71c...5514d2d29454

            People

            • Assignee:
              jglick Jesse Glick
              Reporter:
              celltestr celltestr
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: