if structure takes too much time

I forgot to say something: Even if i am not going in this statement, i have the problem

 else if (digitalRead(PharesDetresse) == HIGH)
 {
  analogWrite(LEDpin, 255);
  delay (100);
  analogWrite(LEDpin, 25);
  delay (800);
 }

also, i put smaller delay times (50 and 200) and it is the same...