Mixing in viscous fluids is challenging, but chaotic advection in principle allows efficient mixing. In the best possible scenario,the decay rate of the concentration profile of a passive scalar should be exponential in time. In practice, several authors have found that the no-slip boundary condition at the walls of a vessel can slow down mixing considerably, turning an exponential decay into a power law. This slowdown affects the whole mixing region, and not just the vicinity of the wall. The reason is that when the chaotic mixing region extends to the wall, a separatrix connects to it. The approach to the wall along that separatrix is polynomial in time and dominates the long-time decay. However, if the walls are moved or rotated, closed orbits appear, separated from the central mixing region by a hyperbolic fixed point with a homoclinic orbit. The long-time approach to the fixed point is exponential, so an overall exponential decay is recovered, albeit with a thin unmixed region near the wall.