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

hudson.util.ProcessTree$windows.killAll() is slow on windows

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • 2.372

      after every build the processtree killer will kick off.

      on my reasonably powererful windows laptop with lots of stuff open this can take 700+ms

      This impacts every unit test and has been the cause of having to disable some tests on windows - which is not great.

      The code needs to be improved.

      One way to do this is to pass the list of environment variables to check down to C++ and only return the pids for them rather then every pid - which is then parsed and put into a map (which consumes over half of the time)

      I have ~490 processes running,

          [JENKINS-67681] hudson.util.ProcessTree$windows.killAll() is slow on windows

          James Nord created issue -
          James Nord made changes -
          Description Original: after every build the processtree killer will kick off.

          on my reasonably powererful windows laptop with lots of stuff open this can take 700+ms

          This impacts every unit test and has been the cause of having to disable some tests on windows - which is not great.

          The code needs to be improved.

          One way to do this is to pass the list of environment variables to check down to C++ and only return the pids for them rather then every pid - which is then parsed and put into a map (which consumes over half of the time)

           !image-2022-01-26-15-29-32-660.png|thumbnail!
          New: after every build the processtree killer will kick off.

          on my reasonably powererful windows laptop with lots of stuff open this can take 700+ms

          This impacts every unit test and has been the cause of having to disable some tests on windows - which is not great.

          The code needs to be improved.

          One way to do this is to pass the list of environment variables to check down to C++ and only return the pids for them rather then every pid - which is then parsed and put into a map (which consumes over half of the time)

           !image-2022-01-26-15-29-32-660.png|thumbnail!

          I have ~490 processes running,
          James Nord made changes -
          Summary Original: hudson.utul.ProcessTree$windows.killAll() is slow on windows New: hudson.util.ProcessTree$windows.killAll() is slow on windows
          James Nord made changes -
          Assignee New: James Nord [ teilo ]
          James Nord made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          James Nord made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]
          James Nord made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          James Nord made changes -
          Remote Link New: This issue links to "upstream PR (Web Link)" [ 27376 ]
          James Nord made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          James Nord made changes -
          Remote Link New: This issue links to "Jenkins PR to update winp (Web Link)" [ 27377 ]
          Basil Crow made changes -
          Released As New: 2.372
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]

            teilo James Nord
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: