Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: Reducing memory usage while matching log entriesby salva (Canon) |
on Feb 02, 2006 at 10:55 UTC ( [id://527296]=note: print w/replies, xml ) | Need Help?? |
The 'sort' idea has the problem that a given lock ID can be locked and unlocked multiple times in the file, so the sorted valued won't always be 'locking' follwed by 'unlocked'.
That shouldn't be a problem as long as you use an stable sort implementation or alternatively the line number or a timestamp as the secondary sorting key.
In Section
Seekers of Perl Wisdom
|
|