Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #17590

Closed (moved)
(moved)
Open
Created Nov 12, 2015 by Nick Mathewson@nickm🍬

Decouple connection_ap_handshake_attach_circuit from nearly everything.

Long ago we used to call connection_ap_handshake_attach_circuit() only in a few places, since connection_ap_attach_pending() attaches all the pending connections, and does so regularly. But this turned out to have a performance problem: it would introduce a delay to launching or connecting a stream.

We couldn't just call connection_ap_attach_pending() every time we make a new connection, since it walks the whole connection list. So we started calling connection_ap_attach_pending all over, instead! But that's kind of ugly and messes up our callgraph.

But we have an opportunity to make Tor simpler!

  • We can make connection_ap_attach_pending() linear in the number of pending entry connections, rather than in the number of total connections.
  • If we do that, we can make it get called from whenever there is a pending entry connection from run_main_loop_once() or somewhere.
  • And if we do that, we can just put connections on a pending-list, rather than calling connection_ap_attach_pending() on them directly.

This will simplify tor, simplify our callgraph, and -- with the help of #17589 (moved) -- break the blob into multiple smaller strongly connected components.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking