salimfadhley/jenkinsapi — pull request #326 by pyleeric (2014-12-11 17:10:43+00:00)
Title: change get_artifacts to improve speed

I'd like to propose a change to `get_artifacts` in `api.py`. I noticed that on my company's Jenkins, a call to `get_artifacts` was extremely slow. After debugging into jenkinsapi, I found the reason was the call to `job.get_build`, which returns a new `Build` object with the default property `depth=1`. I noticed the nearby `get_build_artifacts` method, which is identical except for specifying `depth=0` when instantiating the `Build` object. I determined that `get_artifacts` would still find the data it needs with `depth=0`, and when I tried out my change, `get_artifacts` returned very quickly. So I think this would be a worthy change.