code: def _populateBuffer(self, stream, n):
          
          try:
              for x in xrange(n):
                  output = stream.next()
                  self._buffer.write(output)
          except StopIteration, e:
              self._deferred.callback(None)
          except Exception, e:
              self._deferred.errback(e)
          else:
              self.delayedCall = reactor.callLater(CALL_DELAY, self._populateBuffer, stream, n)
docs: Iterator that returns N steps of
          the genshi stream.
  
          Found that performance really sucks for
          n = 1 (0.5 requests/second for the root resources
          versus 80 requests/second for a blocking algorithm).
  
          Hopefully increasing the number of steps per timeslice will
          significantly improve performance.