[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [tor/master 4/6] Remove "is this too slow?" XXXX comments for code not appearing in profiles
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Fri, 15 Oct 2010 11:21:33 -0400
Subject: Remove "is this too slow?" XXXX comments for code not appearing in profiles
Commit: 247ce5876a56cdbbd6a7b3f501476ff10f4bce5e
---
src/or/circuitbuild.c | 2 --
src/or/networkstatus.c | 3 +--
src/or/policies.c | 2 +-
src/or/routerlist.c | 7 -------
4 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index a4cdf81..9c7262a 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -3032,8 +3032,6 @@ choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state)
nodelist_add_node_family(excluded, node);
}
if (firewall_is_fascist_or()) {
- /*XXXX This could slow things down a lot; use a smarter implementation */
- /* exclude all ORs that listen on the wrong port, if anybody notices. */
smartlist_t *nodes = nodelist_get_list();
SMARTLIST_FOREACH(nodes, const node_t *,node, {
if (!fascist_firewall_allows_node(node))
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 2361faa..a99893f 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -971,7 +971,7 @@ networkstatus_vote_find_entry(networkstatus_t *ns, const char *digest)
return networkstatus_vote_find_mutable_entry(ns, digest);
}
-/*XXXX make this static once functions are moved into this file. */
+/*XXXX MOVE make this static once functions are moved into this file. */
/** Search the routerstatuses in <b>ns</b> for one whose identity digest is
* <b>digest</b>. Return value and set *<b>found_out</b> as for
* smartlist_bsearch_idx(). */
@@ -2031,7 +2031,6 @@ routers_update_status_from_consensus_networkstatus(smartlist_t *routers,
} SMARTLIST_FOREACH_JOIN_END(rs, router);
/* Now update last_listed_as_valid_until from v2 networkstatuses. */
- /* XXXX If this is slow, we need to rethink the code. */
SMARTLIST_FOREACH(networkstatus_v2_list, networkstatus_v2_t *, ns, {
time_t live_until = ns->published_on + V2_NETWORKSTATUS_ROUTER_LIFETIME;
SMARTLIST_FOREACH_JOIN(ns->entries, const routerstatus_t *, rs,
diff --git a/src/or/policies.c b/src/or/policies.c
index b7b377b..8d8de11 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -1088,7 +1088,7 @@ policy_summary_split(smartlist_t *summary,
int start_at_index;
int i = 0;
- /* XXXX Do a binary search if run time matters */
+
while (AT(i)->prt_max < prt_min)
i++;
if (AT(i)->prt_min != prt_min) {
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 94d59e3..cfeaf20 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2656,7 +2656,6 @@ routerinfo_free(routerinfo_t *router)
}
addr_policy_list_free(router->exit_policy);
- /* XXXX Remove if this turns out to affect performance. */
memset(router, 77, sizeof(routerinfo_t));
tor_free(router);
@@ -2671,7 +2670,6 @@ extrainfo_free(extrainfo_t *extrainfo)
tor_free(extrainfo->cache_info.signed_descriptor_body);
tor_free(extrainfo->pending_sig);
- /* XXXX remove this if it turns out to slow us down. */
memset(extrainfo, 88, sizeof(extrainfo_t)); /* debug bad memory usage */
tor_free(extrainfo);
}
@@ -2685,7 +2683,6 @@ signed_descriptor_free(signed_descriptor_t *sd)
tor_free(sd->signed_descriptor_body);
- /* XXXX remove this once more bugs go away. */
memset(sd, 99, sizeof(signed_descriptor_t)); /* Debug bad mem usage */
tor_free(sd);
}
@@ -2787,7 +2784,6 @@ routerlist_insert(routerlist_t *rl, routerinfo_t *ri)
{
routerinfo_t *ri_old;
{
- /* XXXX Remove if this slows us down. */
const routerinfo_t *ri_generated = router_get_my_routerinfo();
tor_assert(ri_generated != ri);
}
@@ -2823,7 +2819,6 @@ extrainfo_insert(routerlist_t *rl, extrainfo_t *ei)
extrainfo_t *ei_tmp;
{
- /* XXXX remove this code if it slows us down. */
extrainfo_t *ei_generated = router_get_my_extrainfo();
tor_assert(ei_generated != ei);
}
@@ -2869,7 +2864,6 @@ static void
routerlist_insert_old(routerlist_t *rl, routerinfo_t *ri)
{
{
- /* XXXX remove this code if it slows us down. */
const routerinfo_t *ri_generated = router_get_my_routerinfo();
tor_assert(ri_generated != ri);
}
@@ -3022,7 +3016,6 @@ routerlist_replace(routerlist_t *rl, routerinfo_t *ri_old,
routerinfo_t *ri_tmp;
extrainfo_t *ei_tmp;
{
- /* XXXX Remove this if it turns out to slow us down. */
const routerinfo_t *ri_generated = router_get_my_routerinfo();
tor_assert(ri_generated != ri_new);
}
--
1.7.1