title: Intellij gradle project sync takes long time
body: <p>Gradle build command from terminal finishes in less than a minute but doing a refresh/sync on Intellij IDE taken 15 to 30 minutes. Tried to change the memory (-Xmx) to different levels 1g, 2g,3g upto 8g, still the time taken is in same range. Out project uses around 50 jars from maven/artifactory repo. </p>
  
  <p>I profiled gradle process using YourKit Profiler, but not able to pin point and solve why it is taking so long. Never used YourKit before. Attached screenshots from YourKit below.</p>
  
  <p><a href="https://i.stack.imgur.com/rAQax.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rAQax.png" alt="enter image description here"></a></p>
  
  <p>.
  <a href="https://i.stack.imgur.com/HSII7.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/HSII7.jpg" alt="enter image description here"></a></p>
  
  <p>Event Timeline shows most of the time is spent on "socket.Read" events (attached below), other events have very negligible time spent.</p>
  
  <p><a href="https://i.stack.imgur.com/jmDrm.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/jmDrm.jpg" alt="enter image description here"></a></p>
  
  <p>UPDATE: Using Gradle version 4.1</p>