Gradle is very slow with no reason

Hi -

I have a demo project with literally nothing in it.

I have a build.gradle with only 'task hello' in it. In other words a perfectly legitimate but useless build script.

When using the JetGradle task list to run the task it takes over 8 seconds! To do nothing!?

What is going on here, there is no call to the compiler, no packaging, nothing. I assume that it is just painfully slow in start up and tear down.

Is there a way to make gradle run faster?


Comment actions Permalink


Are there auto-generated thread dumps?

Could you provide a screencast which illustrates the problem?


Comment actions Permalink

Thanks - I have attached a file..


Comment actions Permalink

Hi Hugh,

The dump you attached belongs to ide startup time. Are you sure that you made it when a gradle task was scheduled for execution?


Comment actions Permalink

Denis -

thanks for taking the time to look over it.

As it happens I have sorted the problem - I was not aware that gradle could be used in daemon mode.

For the sake of others reading this thread, if you experience multi-second startup time of gradle every time you run a task from within IDEA

add a files with "org.gradle.daemon=true". This will ensure the first time you run gradle it will fork a process and keep running in the background so future calls to gradle will not require expensive gradle loading.

more info here:


Please sign in to leave a comment.