# Gradle taking twice as long as maven to run on jenkins

**URL:** https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399
**Category:** Help/Discuss
**Created:** [January 31, 2019, 8:58pm UTC](https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399 "2019-01-31T20:58:07Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![snowe](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/snowe/32/6575_2.png) [@snowe](https://discuss.gradle.org/u/snowe)
#### Post date: [January 31, 2019, 8:58pm UTC](https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399/1 "2019-01-31T20:58:07Z")

</div>

Not much else to say, gradle takes about 5 minutes to run locally and almost 30 minutes to run in jenkins. I’m unsure why, and I don’t think I can run a build scan since it’s company code and I can’t convince the company to get gradle enterprise until I get us actually using gradle and show it’s worth.

---

<div class="post-metadata">

### Author: ![Schalk\_Cronje](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/schalk_cronje/32/6511_2.png) [@Schalk\_Cronje](https://discuss.gradle.org/u/Schalk_Cronje)
#### Post date: [February 1, 2019, 8:54am UTC](https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399/2 "2019-02-01T08:54:19Z")

</div>

Try running with the Gradle profiler (–profile).

---

<div class="post-metadata">

### Author: ![saminuwayser](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@saminuwayser](https://discuss.gradle.org/u/saminuwayser)
#### Post date: [February 3, 2019, 4:49pm UTC](https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399/3 "2019-02-03T16:49:16Z")

</div>

Sorry but are you comparing gradle/local vs gradle/jenkins? If so why the reference to Maven in the subject?

---

<div class="post-metadata">

### Author: ![snowe](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/snowe/32/6575_2.png) [@snowe](https://discuss.gradle.org/u/snowe)
#### Post date: [February 3, 2019, 5:02pm UTC](https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399/4 "2019-02-03T17:02:59Z")

</div>

I didn’t write my title very clearly did I?

We’re converting from maven to gradle. Gradle is faster **locally** , by about double. But on jenkins it’s taking 2-3 times as long to run as maven with the same project.

The `--profile` flag that @Schalk_Cronje suggested is a good start. I just need to have a way to get the profile reports off of jenkins.

---

<div class="post-metadata">

### Author: ![David\_Karr](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/david_karr/32/145_2.png) [@David\_Karr](https://discuss.gradle.org/u/David_Karr)
#### Post date: [February 3, 2019, 5:30pm UTC](https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399/5 "2019-02-03T17:30:02Z")

</div>

> [@snowe](#):
>
> I didn’t write my title very clearly did I?
> 
> We’re converting from maven to gradle. Gradle is faster **locally** , by about double. But on jenkins it’s taking 2-3 times as long to run as maven with the same project.
> 
> The `--profile` flag that @Schalk_Cronje suggested is a good start. I just need to have a way to get the profile reports off of jenkins.

With a conventional Jenkins instance, you should be able to inspect the workspace and even download workspace files as a zip file. In a scripted pipeline job, the “Pipeline Steps” action in the left nav is the first step in getting to that.

---

<div class="post-metadata">

### Author: ![snowe](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/snowe/32/6575_2.png) [@snowe](https://discuss.gradle.org/u/snowe)
#### Post date: [February 4, 2019, 5:35pm UTC](https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399/6 "2019-02-04T17:35:05Z")

</div>

Hm. Our jenkins instance must not be conventional then. Because there’s nothing present in the Pipeline Steps to pull from. Anyway, I’ve just requested ssh access. I’ll pull the profiles from there. Are they going to be as detailed as build scans?

---

<div class="post-metadata">

### Author: ![Schalk\_Cronje](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/schalk_cronje/32/6511_2.png) [@Schalk\_Cronje](https://discuss.gradle.org/u/Schalk_Cronje)
#### Post date: [February 17, 2019, 10:13pm UTC](https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399/7 "2019-02-17T22:13:08Z")

</div>

You could tell Jenkins to archive the profile files as a post-build step.

---

<div class="post-metadata">

### Author: ![snowe](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/snowe/32/6575_2.png) [@snowe](https://discuss.gradle.org/u/snowe)
#### Post date: [March 14, 2019, 8:14pm UTC](https://discuss.gradle.org/t/gradle-taking-twice-as-long-as-maven-to-run-on-jenkins/30399/8 "2019-03-14T20:14:59Z")

</div>

I’m not sure I understand what you mean
