Improve performance for MarkdownEditorView.

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

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.

reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/markdownEditorView.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/markdownEditorView.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (8cffc44)
Loading...