get_running_builds very slow to return results
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python Jenkins |
New
|
Undecided
|
Unassigned |
Bug Description
In our site, I have found get_running_builds to be very slow.
I have found that it's because depth=2 is used when calling get_node_info, and it seems to be fixed by the following patch:
diff --git a/jenkins/
index b443756..20cc17c 100755
--- a/jenkins/
+++ b/jenkins/
@@ -1411,7 +1411,7 @@ class Jenkins(object):
- info = self.get_
+ info = self.get_
After we change the depth to 1, I can still get the list of running builds, so depth=2 seems to be a waste. But I may be missing something here, is there a reason why we must use depth=2 instead of depth=1?
When using depth=2, it takes 6 minutes to return, after changing it to depth=1, it takes 2 seconds only.