Arduino Uno: strange processing delay

The Arduino Uno receives a message on serial input, but subsequent action is delayed by several 100ms.
Program code below, what could be the reason for this delay.

int red = 2;
int green = 3;
int blue = 4;

void setup() {
  Serial.begin(1200);
  pinMode(red, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(blue, OUTPUT);
}

void loop() {
  String input = Serial.readString();
  if (input == "SEND1") {
    Serial.println("ON");
    digitalWrite(red, HIGH);
  }
  if (input == "SEND0") {
    Serial.println("OFF");
    digitalWrite(red, LOW);
  }
}
[\code]

Could it be down to the timeout of readString?

It is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. This can happen after the program has been running perfectly for some time. Just use cstrings - char arrays terminated with '\0' (NULL).

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.

...R