title: why is there a 5-10 second delay during meteor Tracker.autorun before database changes are updated in UI?
body: <p>I'm updating a d3.js chart in my meteor UI in response to MongoDB updates.
  For some reason it takes anywhere between 5 to 10 seconds before the changes, which I make to my local MongoDB manually, are reflected in the chart.</p>
  
  <p>Here is the code, perhaps someone would spot the reason for this delay:</p>
  
  <pre><code>    Template.diagram.rendered = function(){
  
  var margin = {top: 20, right: 20, bottom: 30, left: 40},
            width = 960 - margin.left - margin.right,
            height = 500 - margin.top - margin.bottom;
        x = d3.scale.ordinal()
          .domain('ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''))
          .rangeRoundBands([0, width], .1);
  
        y = d3.scale.linear()
          .domain([0,0.15])
          .range([height, 0]);
        var xAxis = d3.svg.axis()
        .scale(x)
        .orient("bottom");
        var yAxis = d3.svg.axis()
        .scale(y)
        .orient("left")
        .ticks(10, "%");
  
        var svg = d3.select("body").append("svg")
        .attr("width", width + margin.left + margin.right)
        .attr("height", height + margin.top + margin.bottom)
        .append("g")
        .attr("transform", "translate(" + margin.left + "," +
              margin.top + ")");
        svg.append("g")
          .attr("class", "x axis")
          .attr("transform", "translate(0," + height + ")")
          .call(xAxis);
        svg.append("g")
          .attr("class", "y axis")
          .call(yAxis)
          .append("text")
          .attr("transform", "rotate(-90)")
          .attr("y", 6)
          .attr("dy", ".71em")
          .style("text-anchor", "end")
          .text("Frequency");
  
        this.autorun(function(){
            var data = Letters.find().fetch();
          if (!data.length){
              return;
          }
          var bars = svg
          .selectAll(".bar")
          .data(data, function(d){return d._id;});
          bars.enter()
            .append("rect")
            .attr("class", "bar")
            .attr("x", function(d) { return x(d.letter); })
            .attr("width", x.rangeBand())
            .attr("height",0)
            .attr("y", height)
            .transition()
            .attr("y", function(d) { return y(d.frequency); })
            .attr("height", function(d) { return height -
            y(d.frequency); });
          bars
            .transition()
            .duration(200)
            .ease("sin-out")
            .attr("y", function(d) { return y(d.frequency); })
            .attr("height", function(d) { return height -
            y(d.frequency); });
        });
      };
  </code></pre>