Build circuits preemptively
Tor builds circuits in advance, to be sure they're available when needed. We should make arti do the same. See also #50 (closed).
The approach for building circuits is specified, more or less accurately, in section 2.1.1 of
C tor's implementation is spread out a bit. The
src/feature/stats/predict_ports.c module does the work of predicting what ports a client will want to connect to in the immediate future; the
circuit_predict_and_launch_new() function in
src/core/or/circuituse.c does the work of launching these circuits as needed.