The behavior of an electrooptic Q-switch in a high-average- power laser is presented. Absorption of laser radiation produces heating of the electrooptic crystal which degrades laser performance. A large increase in output energy stability is achieved by employing a switching voltage pulse of the special temporal shape to the Pockels cell. The optimum pulse waveform has been calculated to reduce the Q-switching intracavity loss to zero at the instant a laser pulse occurs. We have compared the laser performance with the conventional rectangular pulse shape and the calculated one. The experiments have demonstrated that at the novel shape of pulse the permissible temperature range of the laser performance without adjustment of switching voltage was extended by a factor of 2-2.5.