Programming a photocell with if/else and analogWrite

This code takes 1,250,000 ms to run...

  for(int b = 0 ; b <= 255; b=b+5) 
  { 
      for(int g = 0 ; g <= 255; g=g+5) 
    { 
      for(int r= 0 ; r <= 255; r=r+5) 
       { 
        analogWrite(9, b);         
        analogWrite(10, g);         
        analogWrite(11, r);    
        delay(10);
       }
 
      } 
    }

If you wait 20 minutes the LED will turn off.