         offset = result.offset
         whiteSpace = /^\s*$/
 
+        @_previousParseTimestamp = @_parseTimestamp
+        @_parseTimestamp = (new Date).getTime()
+
         # Return empty list if all we got is white space
-        return [] if result.data.match whiteSpace
+        if result.data.match whiteSpace
+            @shrinkRequestLength()
+            return []
 
         # We have more stuff to fetch if we got `requestLength` data back
         # and (we're going forwards or we're at the start)

        # there's more to fetch
        moreToFetch: undefined
        moreToFetchAtBeginning: undefined

    url: => "#{ config.apiRoot }/sandbox/#{ @taskId }/read"



            line

    growRequestLength: (previousParseTimestamp, lastParseTimestamp) ->
        return if !previousParseTimestamp? or !lastParseTimestamp?

        # Only grow the request length if we request quickly in succession
        delta = lastParseTimestamp - previousParseTimestamp
        # console.log "delta", delta

        if delta < 5000 and @state.get('currentRequestLength') <= @maxRequestLength
            newRequestLength = parseInt(@state.get('currentRequestLength') * @requestLengthGrowthFactor, 10)
            newRequestLength = @maxRequestLength if newRequestLength > @maxRequestLength
            # console.log "newRequestLength", newRequestLength, "(old = #{@state.get('currentRequestLength')})"

            @state.set('currentRequestLength', newRequestLength)

    shrinkRequestLength: ->
        return if @state.get('currentRequestLength') <= @baseRequestLength

        newRequestLength = parseInt(@state.get('currentRequestLength') / @requestLengthGrowthFactor, 10)
        newRequestLength = @maxRequestLength if newRequestLength < @baseRequestLength
        # console.log "new smaller requestLength", newRequestLength, "(old = #{@state.get('currentRequestLength')})"

        @state.set('currentRequestLength', newRequestLength)

module.exports = LogLines
