     editorElement = atom.views.getView(editor)
     @subscriptions.add atom.commands.add editorElement, 'git-diff-staged:update-diffs', @scheduleUpdate
 
-    @scheduleUpdate()
+    @scheduleUpdate(100)
 
   reset: ->
     @subscriptions = new CompositeDisposable()
     @decorations = {}
     @markers = []
-    @immediateId = @repository = @editor = null
+    @timeoutId = @repository = @editor = null
 
   dispose: =>
     @cancelUpdate()

    @reset()
    @editor = editor

    @subscriptions.add(@editor.onDidStopChanging(@updateDiffs))
    @subscriptions.add(@editor.onDidChangePath(@updateDiffs))

    @subscribeToRepository()
    @subscriptions.add atom.project.onDidChangePaths @subscribeToRepository

        @scheduleUpdate() if changedPath is @editor.getPath()

  cancelUpdate: ->
    clearTimeout(@timeoutId)

  scheduleUpdate: (timeout = 50)=>
    @cancelUpdate()
    @timeoutId = setTimeout(@updateDiffs, timeout)

  updateDiffs: =>
    return if @editor.isDestroyed()
