tor/changes/bug27224
rl1987 1e77376e1a 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.
2018-09-13 16:38:33 -04:00

6 lines
224 B
Plaintext

o Minor bugfixes (performance)::
- Rework node_is_a_configured_bridge() to no longer
call node_get_all_orports(), which was performing too
many memory allocations. Fixes bug 27224; bugfix on
0.2.3.9.