Only tokenize in background if when a buffer is visible in an editor

This will prevent running a bunch of background tokenization when Atom is reloaded. We only perform tokenization to support content that is actually on screen.
This commit is contained in:
Nathan Sobo
2012-11-23 12:14:46 -07:00
parent f28cedea7d
commit a1ae819908
5 changed files with 12 additions and 1 deletions

View File

@@ -422,6 +422,7 @@ class Editor extends View
@activeEditSession.off()
@activeEditSession = @editSessions[index]
@activeEditSession.setVisible(true)
@activeEditSession.on "buffer-contents-change-on-disk", =>
@showBufferConflictAlert(@activeEditSession)