Text this: A shortened time horizon approach for optimization with differential-algebraic constraints