Hi,
I am a new user of gradle (so it is likely I am doing something stupid).
From the doco I got the impression that running a gradle build with the daemon should speed things up (possibly by avoiding a load of startup overhead).
However, when I try this I find that the build runs slower overall when using the daemon…
I am using gradle 1.1 on Win7 64bit from a command line.
If I run a build from the command line without the daemon I get:
C:\Users\andy.redhead\git\demo-numberguess\numberguess>gradle -Peap6repo=C:/ar-work/devenv/testing/repo compileJava
:compileJava UP-TO-DATE
BUILD SUCCESSFUL
Total time: 3.715 secs
When I run with the daemon I get:
C:\Users\andy.redhead\git\demo-numberguess\numberguess>gradle --daemon -Peap6repo=C:/ar-work/devenv/testing/repo compileJava
:compileJava UP-TO-DATE
BUILD SUCCESSFUL
Total time: 6.862 secs
The build time is ~3 seconds longer (on a 3.5 second build).
Running with the daemon with -d shows:
C:\Users\andy.redhead\git\demo-numberguess\numberguess>gradle --daemon -d -Peap6repo=C:/ar-work/devenv/testing/repo compileJava
21:44:23.730 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@3194737d, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@92a2cf9, org.gradle.logging.internal.JavaUtilLoggingConfigurer@2fee9422]
21:44:23.890 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
21:44:23.894 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
21:44:23.915 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
21:44:23.917 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Attempting to connect to [6c03b282-7451-4972-8b0a-dc037c172aad port:49515, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]].
21:44:23.919 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /127.0.0.1.
21:44:24.933 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /127.0.0.1, skipping.
21:44:24.938 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /0:0:0:0:0:0:0:1.
21:44:25.946 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /0:0:0:0:0:0:0:1, skipping.
21:44:25.953 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonConnector] We cannot connect to the daemon at [6c03b282-7451-4972-8b0a-dc037c172aad port:49515, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]] due to org.gradle.messaging.remote.internal.ConnectException: Could not connect to server [6c03b282-7451-4972-8b0a-dc037c172aad port:49515, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]]. Tried addresses: [/127.0.0.1, /0:0:0:0:0:0:0:1].. We will not remove this daemon from the registry because the connection issue may have been temporary.
21:44:25.961 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Attempting to connect to [7a999b55-05bb-4178-be76-21738c9e448e port:53612, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]].
21:44:25.966 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /127.0.0.1.
21:44:26.973 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /127.0.0.1, skipping.
21:44:26.974 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /0:0:0:0:0:0:0:1.
21:44:27.975 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /0:0:0:0:0:0:0:1, skipping.
21:44:27.982 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonConnector] We cannot connect to the daemon at [7a999b55-05bb-4178-be76-21738c9e448e port:53612, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]] due to org.gradle.messaging.remote.internal.ConnectException: Could not connect to server [7a999b55-05bb-4178-be76-21738c9e448e port:53612, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]]. Tried addresses: [/127.0.0.1, /0:0:0:0:0:0:0:1].. We will not remove this daemon from the registry because the connection issue may have been temporary.
21:44:27.990 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Attempting to connect to [e529c701-04f0-4409-a703-ea2a6d362c39 port:55799, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]].
21:44:27.994 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /127.0.0.1.
21:44:28.998 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /127.0.0.1, skipping.
21:44:29.004 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /0:0:0:0:0:0:0:1.
21:44:30.009 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /0:0:0:0:0:0:0:1, skipping.
21:44:30.015 [DEBUG] [org.gradle.launcher.daemon.client.DefaultDaemonConnector] We cannot connect to the daemon at [e529c701-04f0-4409-a703-ea2a6d362c39 port:55799, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]] due to org.gradle.messaging.remote.internal.ConnectException: Could not connect to server [e529c701-04f0-4409-a703-ea2a6d362c39 port:55799, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]]. Tried addresses: [/127.0.0.1, /0:0:0:0:0:0:0:1].. We will not remove this daemon from the registry because the connection issue may have been temporary.
21:44:30.023 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Attempting to connect to [8e2a95d5-aaf3-445c-9d05-01d6320ae02a port:50775, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]].
21:44:30.028 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /127.0.0.1.
21:44:30.034 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Connected to address /127.0.0.1.
21:44:30.059 [INFO] [org.gradle.launcher.daemon.client.DaemonClient] Connected to the daemon. Dispatching Build{id=89a7cb70-2093-4097-9caf-4a78c986e236.1, currentDir=C:\Users\andy.redhead\git\demo-numberguess\numberguess} request.
21:44:30.084 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 7828). The daemon log file: C:\Users\andy.redhead\.gradle\daemon.1\daemon-7828.out.log
Is it normal to have a number of failed attempts to connect to the daemon?
Without really knowing whats going on it looks like there is a lot of time spent failing to connect to the daemon… ?
Cheers, Andy