[tor-bugs] #6471 [Metrics Utilities]: Design file format and Python/Java library for multiple GeoIP or AS databases

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Nov 7 01:53:24 UTC 2012


#6471: Design file format and Python/Java library for multiple GeoIP or AS
databases
-------------------------------+--------------------------------------------
 Reporter:  karsten            |          Owner:                
     Type:  enhancement        |         Status:  needs_revision
 Priority:  normal             |      Milestone:                
Component:  Metrics Utilities  |        Version:                
 Keywords:                     |         Parent:                
   Points:                     |   Actualpoints:                
-------------------------------+--------------------------------------------

Comment(by karsten):

 Replying to [comment:16 atagar]:

 I think I just made all changes you suggested, but I'm having trouble with
 the following:

 > > for line in input_file.readlines():
 > File objects themselves are iterable over the lines. I suspect that
 calling readlines() here is creating a defensive copy with a list of
 lines, so this causes you to read the file into memory twice (both for
 this list and what we add while processing it).

 Are you certain that the current code leads to reading the file into
 memory twice?

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6471#comment:18>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list