We consider, as a case study, the optimization of mixing protocols for a two-dimensional, piecewise steady, nonlinear flow, the sine flow, for both the advective–diffusive and purely advective cases. We use the mix-norm as the cost function to be minimized by the optimization procedure. We show that the cost function possesses a complex structure of local minima of nearly the same values and, consequently, that the problem possesses a large number of sub-optimal protocols with nearly the same mixing efficiency as the optimal protocol. We present a computationally efficient optimization procedure able to find a sub-optimal protocol through a sequence of short-time-horizon optimizations. We show that short-time-horizon optimal mixing protocols, although sub-optimal, are both feasible and efficient at mixing flows with and without diffusion. We also show that these optimized protocols can be derived, at lower computational cost, for purely advective flows and successfully transported to advective–diffusive flows with small molecular diffusivity. We characterize our results by discussing the asymptotic properties of the optimized protocols both in the pure advection and in the advection–diffusion cases. In particular, we quantify the mixing efficiency of the optimized protocols using the Lyapunov exponents and Poincaré sections for the pure advection case, and the eigenvalue–eigenfunction spectrum for the advection–diffusion case. Our results indicate that the optimization over very short-time horizons could in principle be used as an on-line procedure for enhancing mixing in laboratory experiments, and in future engineering applications.