summaryrefslogtreecommitdiff
path: root/src/ext/README
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-08-24 18:26:27 +0300
committerNick Mathewson <nickm@torproject.org>2018-09-13 16:38:33 -0400
commit1e77376e1ac316ec2612b385c6e05af39d9113a8 (patch)
tree8c94e33a1fd8f4d9d289772288c1bf863451e956 /src/ext/README
parent874eca6a8c318c6a8a913520299e36a2757aa490 (diff)
downloadtor-1e77376e1ac316ec2612b385c6e05af39d9113a8.tar.gz
tor-1e77376e1ac316ec2612b385c6e05af39d9113a8.zip
Avoid calling node_get_all_orports() from node_is_a_configured_bridge()
All node_get_all_orports() does is allocate and return a smartlist with at most two tor_addr_port_t members that match ORPort's of node configuration. This is harmful for memory efficiency, as it allocates the same stuff every time it is called. However, node_is_a_configured_bridge() does not need to call it, as it already has all the information to check if there is configured bridge for a given node. The new code is arranged in a way that hopefully makes each succeeding linear search through bridge_list less likely.
Diffstat (limited to 'src/ext/README')
0 files changed, 0 insertions, 0 deletions