The spikes are probably because the document has to go through the whole text and update it, relayout the whole document and do the highlighting (if you use it).