Recompute messages only when needed