in reply to Re^2: Reducing memory usage while matching log entries
in thread Reducing memory usage while matching log entries

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.

  • Comment on Re^3: Reducing memory usage while matching log entries