 # and readible rendering code that also performs well (hopes... dreams)
 #
 
-
-#
-# Problem:
-#   Processing is "leaking" (from 2%-50% of a core) over the course of an hour
-#   and I have no idea what is causing this.
-#
-# Hypotheses:
-#   - SVG + d3 weirdness 
-#     a) I am not using the library 'as expected' causing something to go wrong
-#     b) Data is never being unbound somehow
-#   - setInterval handling functions are not being properly destroyed
-#     a) this causes massive idles on the tab which are flooding the core
-#   - A bug in Chrome (seems highly unlikely)
-#     a) Highly unlikely
-#     b) Might be caused by SVG canvas interplay
-#
-# Experiement:
-#   *0) Take an initial heap snapshot and start the data feed
-#   *1) Let the process run for 1 hour taking readings at 15 minute intervals
-#   *2) Take a secondary heap snapshot
-#   *3) Create a 5 minute cpu profile
-#   *4) Analyze results for hints as the root cause
-#
-# Result:
-#  10:15 PM - Base 6.4% core usage
-#  10:31 PM - Base 24-30% core usage
-#  10:46 PM - 33-46%
-#  11:02 PM - 55-67%
-#  11:19 PM - 60-68%
-#
-# Most of it seems to be d3
-#
 
 class F.Time.Bar extends F.Chart.Canvas
   defaults =

        .ease('linear')
        .call(@rightAxis())

  # This is called every time we introduce new data (as a result of _shift)
  # it checks to see if we also need to update the working tick set and
  # makes the approriate changes for handling tick animation (enter, exit, 
  # and update in the d3 model).
  _updateTicks: (newTime) ->
    return unless @_ticks[0].x - @w() <= 0
    @_ticks[0].exit = true
    @_ticks.push @_makeTick(@options.windowSize, newTime, true)
    @redrawTimeAxes()

  animate: ->
    return unless @inTransition()
    @stopTransition() if ++@animation.frame == @animation.duration

      duration: @options.fps

    # Top and Bottom axis ticks
    @_prepareTimeAxes()
    @_prepareRangeAxes()
    

  hasAxis: (name) ->
    @options.axes.indexOf(name) > -1
