in reply to Memory question

I see lots of room to improve the speed (replace most of the arrays with hashes). But this would probably increase the memory usage.

But if it only pops up in top mem usage when it gets activated, then you are talking about working set size, not total virtual memory usage. Predicting max working set size is much harder (at least for me), so I can't see any changes that would clearly reduce it.

The only place I see to reduce total virtual memory usage is to not append everything into $output when you are just going to print it out. Unless you have very long lines that match a ton of your keywords, I don't think this will make a large improvement.

        - tye (but my friends call me "Tye")