Improve performance for MarkdownEditorView.

Review Request #6427 — Created Oct. 10, 2014 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
7da4bb6...

Reviewers

MarkdownEditorView was listening to some frequently-emitted signals on
CodeMirror, performing calculations, and then emitting its own signals.
This ended up taking enough time that it led to a slowdown of text
input, making the input feel sluggish.

We now throttle the events. Viewport changes are limited to one every
250ms, and change events are limited to one every 500ms.

The result is that the widget went from sometimes sluggish performance
to near-native (though this will likely still depend on how overloaded
the browser is and what the page is doing).

Tried typing in the fields, and saw that the text wasn't feeling as
sluggish rendering on the page.

We'll have to see if others feel that this is really making an
improvement.