XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This plugin has implemented a nice clean up workspace option (restore changed / deleted and quick clean). Is there a benefit to supporting the p4 clean option provided since p4 2014.1? They seem to do the same thing, I would assume p4 clean is faster but have not tested that.

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          The native p4 clean would most definitely be faster. I believe the official p4-plugin supports this, so you may want to switch to that one.

          Show
          rpetti Rob Petti added a comment - The native p4 clean would most definitely be faster. I believe the official p4-plugin supports this, so you may want to switch to that one.
          Hide
          evanb Evan Benn added a comment -

          Thanks Rob, I have had a look at the official plugin and I believe it is not yet as stable as this project.
          I brought this issue up as I as having performance issues with the clean command. The issue is that the same perforce workspace is taking ~10* longer to set up on windows vs linux. The main culprit for this seems to be the 'p4 diff -se' command. Between this and the next command in the console there is ~30 seconds on linux vs 10 minutes on windows. When I tested p4 diff -se on the agent manually (same workspace), it only takes about 30 seconds.

          Is there possibly an issue with the plugin code running at this time? I will try to have a look at the source to see if I can work out where this might be occurring. The leaked file descriptors could also indicate the issue.

          WINDOWS
          14:31:08 [****] $ p4 d C:\jenkins**** -x have
          14:31:24 Workspace is clean.
          14:31:24 Restoring changed and deleted files...
          14:31:24 [****] $ p4 d C:\jenkins**** -x sync -f
          14:31:24 [****] $ p4 -d C:\jenkins**** diff -se
          14:43:49 Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information - no such file(s).
          14:43:49 [****] $ p4 d C:\jenkins**** -x sync -f
          14:43:49 [****] $ p4 -d C:\jenkins**** diff -sd
          14:44:02 Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information - no such file(s).
          14:44:02 Files restored.
          14:44:02 Clean complete, took 774043 ms

          LINUX
          14:44:45 [****] $ p4 d /home/*/jenkins/*** -x have
          14:44:50 Workspace is clean.
          14:44:50 Restoring changed and deleted files...
          14:44:50 [****] $ p4 d /home/*/jenkins/*** -x sync -f
          14:44:50 [****] $ p4 -d /home/*/jenkins/*** diff -se
          14:45:31 [****] $ p4 d /home/*/jenkins/*** -x sync -f
          14:45:31 [****] $ p4 -d /home/*/jenkins/*** diff -sd
          14:45:32 Files restored.
          14:45:32 Clean complete, took 47414 ms

          Show
          evanb Evan Benn added a comment - Thanks Rob, I have had a look at the official plugin and I believe it is not yet as stable as this project. I brought this issue up as I as having performance issues with the clean command. The issue is that the same perforce workspace is taking ~10* longer to set up on windows vs linux. The main culprit for this seems to be the 'p4 diff -se' command. Between this and the next command in the console there is ~30 seconds on linux vs 10 minutes on windows. When I tested p4 diff -se on the agent manually (same workspace), it only takes about 30 seconds. Is there possibly an issue with the plugin code running at this time? I will try to have a look at the source to see if I can work out where this might be occurring. The leaked file descriptors could also indicate the issue. WINDOWS 14:31:08 [****] $ p4 d C:\jenkins**** -x have 14:31:24 Workspace is clean. 14:31:24 Restoring changed and deleted files... 14:31:24 [****] $ p4 d C:\jenkins**** -x sync -f 14:31:24 [****] $ p4 -d C:\jenkins**** diff -se 14:43:49 Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information - no such file(s). 14:43:49 [****] $ p4 d C:\jenkins**** -x sync -f 14:43:49 [****] $ p4 -d C:\jenkins**** diff -sd 14:44:02 Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information - no such file(s). 14:44:02 Files restored. 14:44:02 Clean complete, took 774043 ms LINUX 14:44:45 [****] $ p4 d /home/* /jenkins/ *** -x have 14:44:50 Workspace is clean. 14:44:50 Restoring changed and deleted files... 14:44:50 [****] $ p4 d /home/* /jenkins/ *** -x sync -f 14:44:50 [****] $ p4 -d /home/* /jenkins/ *** diff -se 14:45:31 [****] $ p4 d /home/* /jenkins/ *** -x sync -f 14:45:31 [****] $ p4 -d /home/* /jenkins/ *** diff -sd 14:45:32 Files restored. 14:45:32 Clean complete, took 47414 ms
          Hide
          rpetti Rob Petti added a comment -

          Reverting changed files will perform no better than a full wipe and sync. Ideally, you should not be altering files tracked by perforce in the first place, as that is incredibly bad practice.

          As for the performance differences, I honestly have no idea.

          This plugin is more or less unmaintained, so if this is an issue then I recommend wither switching to the new plugin, or just calling p4 clean as a build step.

          Show
          rpetti Rob Petti added a comment - Reverting changed files will perform no better than a full wipe and sync. Ideally, you should not be altering files tracked by perforce in the first place, as that is incredibly bad practice. As for the performance differences, I honestly have no idea. This plugin is more or less unmaintained, so if this is an issue then I recommend wither switching to the new plugin, or just calling p4 clean as a build step.
          Hide
          evanb Evan Benn added a comment -

          Hi,
          I have tested running p4 clean ... as a batch file step. The performance is the same on windows as using the p4 plugin quick clean + restore changed / deleted.
          The odd thing I am seeing is that running the command locally runs about 10 times faster. This is backed up by the performance monitor having ~10x the hard drive read speed. I do not know what would be the cause of this. I may need to create a new ticket against a different category.

          Show
          evanb Evan Benn added a comment - Hi, I have tested running p4 clean ... as a batch file step. The performance is the same on windows as using the p4 plugin quick clean + restore changed / deleted. The odd thing I am seeing is that running the command locally runs about 10 times faster. This is backed up by the performance monitor having ~10x the hard drive read speed. I do not know what would be the cause of this. I may need to create a new ticket against a different category.

            People

            • Assignee:
              Unassigned
              Reporter:
              evanb Evan Benn
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: