Why does the arduino respond so slow to serial input I have this really simple sketch where I blink a led light.
If I send another value threw the serial monitor then first there is always a brief second where the light doesn't blink anymore. Why is that, and how can I get rid of that?

int the_delay = 300;

void setup() {
  Serial.begin(115200);
  pinMode(12, OUTPUT);
}

void loop() {
  digitalWrite(12, HIGH);   
  delay(the_delay);            
  digitalWrite(12, LOW);    
  delay(the_delay);            
}


void serialEvent() {

  if (Serial.available()) {   
    the_delay = Serial.parseInt();
    Serial.println(the_delay);
  }
}


In case it helps, eventually I would like to send values with 60fps.
It's because you're using Serial.parseInt().  It uses a timeout to find the end of the data on the serial port, and while it's waiting for that timeout it can do nothing else.

You would be better off manually reading the serial data a character at a time to build up an input string (C-string, not Arduino String) with a proper line terminator (line-feed, \n) and then convert that into an integer with atoi().