             setTimeout => @$search.focus()
 
         lastText = ''
+        showSpinnerTimeout = undefined
+        showSlowSearchAPITimeout = undefined
 
         @$search.unbind().on 'change keypress paste focus textInput input click keydown', _.debounce =>
             text = _.trim @$search.val()

                if @lastXhrTasks?
                   @lastXhrTasks.abort()
                   @lastXhrRequests.abort()

                @forceSearchOnce = false
                lastText = text

                @tasksResults = new TasksSearch [], { query: text, params: @currentSearchOptions['tasks'] }
                @lastXhrTasks = @tasksResults.fetch()

                showSpinnerTimeout = setTimeout =>
                    @$el.find('.results').html '<br><br><div class="page-loader centered"></div>'
                , 500

                showSlowSearchAPITimeout = setTimeout =>
                    @$el.find('.results').html '<br><br><div class="page-loader centered"></div><br><br><center>Sorry the search API is <a href="https://github.com/HubSpot/Singularity/issues/90" target="_blank">so slow</a>...</center>'
                , 2000

                $.when(@lastXhrTasks, @lastXhrRequests).done =>
                    clearTimeout showSpinnerTimeout
                    clearTimeout showSlowSearchAPITimeout
                    @renderResults()

        , 35

