Chris <[EMAIL PROTECTED]> wrote: > For the first one you are parsing the entire file everytime you want > to lookup just one domain...
Is the file sorted? If so wouldn't it be easier either to read the whole thing and then binary-chop search it, or if the file is vast to use seek creatively to binary chop it but only read particular records from disk? (One could chop by using seek to locate to a particular byte location in the file then read to end of that record then read the next complete record.) If the file isn't sorted, then .... why not? Also if the file is vast surely there's some or a lot of point in breaking it up into a group of smaller files? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list