  We present an algorithm for solving stochastic heat equations, whose key
ingredient is a non-uniform time discretization of the driving Brownian motion
$W$. For this algorithm we derive an error bound in terms of its number of
evaluations of one-dimensional components of $W$. The rate of convergence
depends on the spatial dimension of the heat equation and on the decay of the
eigenfunctions of the covariance of $W$. According to known lower bounds, our
algorithm is optimal, up to a constant, and this optimality cannot be achieved
by uniform time discretizations.
