The response surface methodology speeds up the search for optimal parameters in the photoinactivation of E. coli by photodynamic therapy.