Dash-rewriting optimized to be performed only after modification.