user11300: I am trying to upload this simple sketch into my arduino with a shield I made. It takes forever (note I have the right COM port on)
  int sensorValue = 0;

  void setup(){ 
     Serial.begin(9600); 
  }

  void loop(){
     sensorValue = analogRead(A4);
     delay(10000000);
     Serial.println(sensorValue); 
     delay(10000000);
  }


user6740: If the problem does indeed lie in the upload (see DoubtBearer's answer), then you should turn on verbose output, to see exactly what part of the upload is giving issues.
In your IDE, click File -> preferences; look for the section "Show verbose output during:" and tick both Compilation and Upload.
Re-run your upload, and see what is taking up all the time. If you can't figure it out from that, please post the log (it will appear in the black area at the bottom of the IDE, you should be able to cut & paste).

user28953: Check the end of this thread for the reply by 'Toshibass', Unbelievable slow compilation of simple sketches

I was having same same problem compile took > 3 minutes for small sketch using serial or OTA however I found solution The program that was slowing down compile was IBM's Trusteer .. Rapport which is a fraud prevention program distributed by my bank once I de-installed it, same compile took 10 seconds, now all I need to do is find an alternative or hope IBM produce a fix after I filled in a issue report to them.

It worked for me, the culprit was some software called 'Trusteer'.

user67689: I had the same problem. I noticed that the RX & TX LEDs we're not flashing as they normally do when I upload a file. I'm using an older knock off nano.
My solution:
Under Tools> processor.... I switched from the defaulted "ATmega328P" to the "ATmega328P(Old Bootloader)" option. The next upload attempt was quick and successful. Normal flashing RX &TX LEDs during the upload as well. Hope this helps someone.

user11488: Are you sure the problem is in the upload time? delay() takes the number of milliseconds you want to wait. In your code, it should take about 3 hours before the Arduino sends some data through the serial port.

11300: <p>I am trying to upload this simple sketch into my arduino with a shield I made. It takes forever (note I have the right COM port on)</p>

<pre class="lang-c prettyprint-override"><code>  int sensorValue = 0;

  void setup(){ 
     Serial.begin(9600); 
  }

  void loop(){
     sensorValue = analogRead(A4);
     delay(10000000);
     Serial.println(sensorValue); 
     delay(10000000);
  }
</code></pre>
 6740: <p>If the problem does indeed lie in the upload (see DoubtBearer's answer), then you should turn on verbose output, to see exactly what part of the upload is giving issues.</p>

<p>In your IDE, click File -> preferences; look for the section "Show verbose output during:" and tick both Compilation and Upload.</p>

<p>Re-run your upload, and see what is taking up all the time. If you can't figure it out from that, please post the log (it will appear in the black area at the bottom of the IDE, you should be able to cut &amp; paste).</p>
 28953: <p>Check the end of this thread for the <a href="http://forum.arduino.cc/index.php?topic=82527.msg2817497#msg2817497" rel="nofollow noreferrer">reply by 'Toshibass'</a>, <a href="http://forum.arduino.cc/index.php?topic=82527.15" rel="nofollow noreferrer">Unbelievable slow compilation of simple sketches</a></p>

<blockquote>
  <p>I was having same same problem compile took > 3 minutes for small sketch using serial or OTA however I found solution The program that was slowing down compile was IBM's Trusteer .. Rapport which is a fraud prevention program distributed by my bank once I de-installed it, same compile took 10 seconds, now all I need to do is find an alternative or hope IBM produce a fix after I filled in a issue report to them.</p>
</blockquote>

<p>It worked for me, the culprit was some software called 'Trusteer'.</p>
 67689: <p>I had the same problem. I noticed that the RX &amp; TX LEDs we're not flashing as they normally do when I upload a file. I'm using an older knock off nano.</p>
<p>My solution:
Under Tools&gt; processor.... I switched from the defaulted &quot;ATmega328P&quot; to the &quot;ATmega328P(Old Bootloader)&quot; option. The next upload attempt was quick and successful. Normal flashing RX &amp;TX LEDs during the upload as well. Hope this helps someone.</p>
 11488: <p>Are you sure the problem is in the upload time? delay() takes the number of milliseconds you want to wait. In your code, it should take about 3 hours before the Arduino sends some data through the serial port.</p>
