[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #6471 [Metrics Utilities]: Design file format and Python/Java library for multiple GeoIP or AS databases
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs