diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-11-23 04:18:45 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-11-23 04:18:45 +0000 |
commit | a39269572fbca21eeba3ac98e2d4b74a094cd212 (patch) | |
tree | 81a5cf4433a2b5895f11b10d3f7dc0a85ba8464a /src/or/rephist.c | |
parent | ae67b87f9ac2927e5e6009461e3095da7a01cce3 (diff) | |
download | tor-a39269572fbca21eeba3ac98e2d4b74a094cd212.tar.gz tor-a39269572fbca21eeba3ac98e2d4b74a094cd212.zip |
Replace balanced trees with hash tables: this should make stuff significantly faster.
svn:r5441
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c index b7a193b290..50b0800345 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -358,8 +358,8 @@ rep_history_clean(time_t before) digestmap_iter_get(orhist_it, &d1, &or_history_p); or_history = or_history_p; if (or_history->changed < before) { - free_or_history(or_history); orhist_it = digestmap_iter_next_rmv(history_map, orhist_it); + free_or_history(or_history); continue; } for (lhist_it = digestmap_iter_init(or_history->link_history_map); @@ -367,9 +367,9 @@ rep_history_clean(time_t before) digestmap_iter_get(lhist_it, &d2, &link_history_p); link_history = link_history_p; if (link_history->changed < before) { + lhist_it = digestmap_iter_next_rmv(or_history->link_history_map,lhist_it); rephist_total_alloc -= sizeof(link_history_t); tor_free(link_history); - lhist_it = digestmap_iter_next_rmv(or_history->link_history_map,lhist_it); continue; } lhist_it = digestmap_iter_next(or_history->link_history_map,lhist_it); |