I don't understand why you added this comment. AFAIK the code below is not about performance, but about enabling undo and redo functions in the text area.