Optimize cell-ewma circuit priority algorithm.
commit06e8370c33d6ccb73d55e9e8c3d2673c48d7b328
authorNick Mathewson <nickm@torproject.org>
Sat, 12 Dec 2009 05:49:48 +0000 (12 00:49 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 14 Dec 2009 02:05:53 +0000 (13 21:05 -0500)
tree2df32183173969c207b0247c9be225a087f9edb6
parentc43fee131d306507937733c7ddc45a040dd2d27c
Optimize cell-ewma circuit priority algorithm.

There are two big changes here:
  - We store active circuits in a priority queue for each or_conn,
    rather than doing a linear search over all the active circuits
    before we send each cell.
  - Rather than multiplying every circuit's cell-ewma by a decay
    factor every time we send a cell (thus normalizing the value of a
    current cell to 1.0 and a past cell to alpha^t), we instead
    only scale down the cell-ewma every tick (ten seconds atm),
    normalizing so that a cell sent at the start of the tick has
    value 1.0).
src/or/circuitlist.c
src/or/config.c
src/or/connection.c
src/or/connection_or.c
src/or/or.h
src/or/relay.c