If we replace entirely the content, it won't require to update the view as you type.  

--  
Hoa V. Dinh


On Monday, May 26, 2014 at 11:44 AM, Devon Carew wrote:

> In ide/app/lib/ace.dart:
> > +class MarkdownEditor extends TextEditor { > + static bool isMarkdownFile(workspace.File file) => file.name.toLowerCase() > + .endsWith('.md'); > + > + Markdown _markdown; > + StreamSubscription _markdownOnDirtySubscription; > + MarkdownEditor._create(AceManager aceManager, workspace.File file, > + SparkPreferences prefs) : super._create(aceManager, file, prefs) { > + _markdown = new Markdown(element, file); > + } > + > + @override > + void activate() { > + super.activate(); > + _markdown.activate(); > + _markdownOnDirtySubscription = onDirtyChange.listen((_) =>  
> It looks like this will re-render the the preview on every keystroke. That might be a bit expensive. The outline view re-renders on every file save. We do that automatically 1 second after the user stops typing. We may need a bit more architecture around the editors, to make it easier to periodically update something after the content has changed. Can you either:
> add a TODO: so we can track this, or
> look at instead resetting a short timer here, and have the timer cause the preview to re-render
>  
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/dart-lang/spark/pull/2027/files#r13054682).
>  
>  
>