 
 fs = Npm.require('fs')
 path = Npm.require('path')
+
+ENABLE_PROFILING = true
 
 Router.configureBodyParsers = ->
   # The resolve-incidents endpoint may have files larger than the default limit

      dailyDecayRate = 1.0
      if (@request.query.activeCases + "").toLowerCase() == "true"
        dailyDecayRate = Math.pow(.5, (1 / event.caseLengthDays))
      baseIncidents = []
      constrainingIncidents = []
      event.incidents.map (incident) ->

      ).concat(supplementalIncidents)
      differentials = _.where(allDifferentials, type: 'cases')
      subIntervals = differentialIncidentsToSubIntervals(differentials)
      console.timeEnd('create differentials') if ENABLE_PROFILING
      console.time('resolve') if ENABLE_PROFILING
      extendSubIntervalsWithValues(differentials, subIntervals)
      console.timeEnd('resolve') if ENABLE_PROFILING
      locationTree = LocationTree.from(subIntervals.map (x) -> x.location)
      topLocations = locationTree.children.map (x) -> x.value
      locToSubintervals = {}
