[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #7241 [Analysis]: Visualize how quickly the Tor network changes
#7241: Visualize how quickly the Tor network changes
----------------------+-----------------------------------------------------
Reporter: asn | Owner:
Type: task | Status: needs_revision
Priority: normal | Milestone:
Component: Analysis | Version:
Keywords: | Parent: #2681
Points: | Actualpoints:
----------------------+-----------------------------------------------------
Changes (by gsathya):
* status: needs_review => needs_revision
Comment:
Hi peer. Thanks for hacking on this!
Replying to [comment:2 peer]:
> What can be done to parse and operate on the consensus data more
quickly? s2012.csv took around 12 hours to generate with pypy
first_pass.py and limited memory.
>
On a first glance -
You seem to be reading and parsing the same consensus file multiple times.
Loading all the consensus(or most) into memory first would speed it up.
{{{
if router.fingerprint in
base_routers:
router_overlap.append(router.fingerprint)
current_router_overlap_count += 1
current_router_overlap_bandwidth += router.bandwidth
for fingerprint in router_overlap:
base_router_overlap_bandwidth +=
base_routers[fingerprint]
}}}
can be changed to
{{{
if router.fingerprint in
base_routers:
router_overlap.append(router.fingerprint)
base_router_overlap_bandwidth += base_routers[router.fingerprint]
current_router_overlap_count += 1
current_router_overlap_bandwidth += router.bandwidth
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7241#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs