update edit mode optimization