Descriptionthe markdown example is noticeably sluggish, even when you're just
using arrow keys to move the cursor around. what happens is: every
keypress in the textarea sets a 'dirty' flag, and every 250ms, if
dirty is true, the textarea is converted to html, whether or not the
actual text has changed. so if you hold down an arrow key, you
can see the cursor pause its motion every 1/4 second.
the slow part is converter.makeHtml(), and I'll dig into that some
more, but independent of that, we don't need to redo the text-to-html
conversion if the text doesn't changed.
this CL does that optimization. (which is an easy optimation that
I think is reasonable to expect gadget writers to do, since this
type of optimization helps performance outside of Caja too)
Patch Set 1 #
Total comments: 1
MessagesTotal messages: 2
|
|||||||||||||||||||