Performance degradation in initial Gradle invocation when using 1.6


(Stefan Marklund) #1

Hello All,

After the other day having switched over to Gradle 1.6 from Gradle 1.5 I have noticed a significant performance decrease in the initial configuration step in Gradle 1.6 compared to the 1.5 version. With initial invocation of gradle I mean after having done a clean code checkout invoking Gradle for the very first time.

See numbers below. Are you aware of any performance issue associated with the 1.6 version?

I have not adjusted my build script for changes pending (for Gradle 2.0) so I do see some new deprication messages.

My Gradle project is fairly large I’d imagine. It is a multiproject containing 198 subprojects.

Performance numbers for an initial ‘gradle tasks’

Gradle 1.6:
===========
Total time: 5 mins 25.951 secs
Total time: 5 mins 47.84 secs
Total time: 5 mins 32.74 secs
Total time: 5 mins 7.843 secs (no daemon)
Total time: 5 mins 31.888 secs (no daemon, profile)
  Profile:
Description Duration
Total Build Time
      5m31.91s
Startup
               1.094s
Settings and BuildSrc
  3.249s
Loading Projects
      0.561s
Configuring Projects
  5m0.02s
Task Execution
      26.779s
       Dependency resolution
 1.125s
       Gradle 1.5:
===========
Total time: 2 mins 31.647 secs
Total time: 2 mins 25.89 secs
Total time: 2 mins 21.674 secs
(no demon)
Total time: 2 mins 28.045 secs
Total time: 2 mins 48.135 secs
(no-daemon, profile)
  Profile:
Description
           Duration
Total Build Time
      2m48.16s
Startup
               1.060s
Settings and BuildSrc
2.417s
Loading Projects
       0.573s
Configuring Projects
  2m17.26s
Task Execution
         26.138s
       Dependency resolution
 1.164s

Across the board the configuration time per subproject is about twice that of Gradle 1.5. The other items are virtually identical. I also supplied the dependency resolution times.

Subsequent invocations of ‘gradle tasks’ are done in ~35s for both Gradle 1.5 and 1.6.

I hope this aids you in your analysis.

Thank you, Stefan Marklund


(Luke Daley) #2

Hi,

Thanks for the report. This is the first time we are hearing about this, so we don’t know what it is yet.

I don’t suppose we can get access to your build to run it with a profiler? We need more information in order to work out what is going on.

If you’re able to, it would be extremely helpful if you could run the build with YourKit attached and send us the exported results (http://www.yourkit.com/docs/90/help/export.jsp). If you’re willing to do this but need help, please let me know and we can work it out.


(Stefan Marklund) #3

Hi Luke,

I’m willing to try it out, Yourkit have a 15 day evaluation license for their profiler so I have downloaded it.

I need you to keep the information within Gradleware though.

Where should I send the data and will a csv export of a snapshot of the configuration step be sufficient for you?

Thanks, Stefan


(Luke Daley) #4

That would be perfect. You can contact me directly via luke.daley@gradleware.com.

Thanks for your cooperation.


(Adam Murdoch) #5

This should be fixed now. Script compilation should now be much faster than Gradle 1.5 or 1.6. Can you try out the most recent nightly build from http://gradle.org/nightly and let us know if it fixes the problem?


(Stefan Marklund) #6

Hi Adam,

I can confirm the issue has been fixed and more when using the 1.7 nightly build.

A couple of tasks runs with script recompilation on my multiproject consistently took 1m37s which is a great improvement over Gradle 1.5 performance even.

Profile information:

Description
 Duration
Total Build Time
  1m37.03s
Startup 0.689s
Settings and BuildSrc
    0.904s
Loading Projects
    0.197s
Configuring Projects 1m5.33s
Task Execution 29.788s

The configuration time is now half that of Gradle 1.5 and less than a quarter of 1.6.

Great work!

Thanks, Stefan