Instantiate CodeMirror widgets on demand only.
Review Request #4990 — Created Nov. 18, 2013 and submitted
Instantiate CodeMirror widgets on demand only.
This lightens MarkdownEditor to only instantiate a CodeMirror wiget as
needed. MarkdownEditor will now create it when show() is called, or when
the inlineEditor begins editing. It will then go away when hidden or
when editing is finished. It should reduce the memory footprint a little
bit. Though it's a bit hard to tell what the savings is, it looks like
it may be as much as 8-10MB.
-
Tested opening, saving and canceling editors.
-
Checked the DOM inspector before, during and after, and saw that the
CodeMirror widgets only existed while the editor was in edit mode. -
Tested review requests, the review dialog, and comment dialogs.
Description | From | Last Updated |
---|---|---|
There's no reason to override render() anymore, is there? |
david |