Reducing elapsed time when swapping from insert to normal mode