in reply to Looking for ideas on how to optimize this specialized grep
what could I do for free?There's no such thing as a free lunch. But if you do this often enough, and it takes so much time you're willing to spend time to optimize it, then why not collect the information when the mail arrives? Just use a disk tied hash (for instance, some DB_File solution), and for each mail that arrives, increment the appropriate value.
Then whenever you want to see the counts, you just get the values from a hash instead of having to parse a huge file.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Looking for ideas on how to optimize this specialized grep
by afresh1 (Hermit) on Jan 21, 2011 at 21:10 UTC | |
by JavaFan (Canon) on Jan 21, 2011 at 21:45 UTC | |
by afresh1 (Hermit) on Jan 21, 2011 at 22:28 UTC |