mrodalgaard / language-log

Log file syntax highlighting in Atom
MIT License
42 stars 9 forks source link

Atom is not responding during a filter #14

Open valvin1 opened 8 years ago

valvin1 commented 8 years ago

First thanks you for your package :) I had a issue with it when I open Android Logcat file issued from command adb logcat -v threadtime In my example I've approximately 5000 lines. When I do a filter regularly Atom is not responding. Filter can be a string or log level. I don't use your package (and Atom) for a long time and I don't know if it produces on other logs type.

mrodalgaard commented 8 years ago

Hi @varod, I agree in your observation. The filter scan (tokenizing or regex) and folding of lines just takes too long when filteringen on log files larger than 2000 lines. This causes Atom to become non-responding, which is far from ideal.

I'll have a look at where the bottleneck is or else I'll have to change the way filtering works. I'm open for suggestions.

mrodalgaard commented 8 years ago

So it turns out the bottleneck is the folding / unfolding of lines (probably because of a render happening) and not the actual filtering (although tokenizeLine under level filtering is also pretty heavy). This means I'll have to change the way lines are filtered out or mark log files above 2000 lines as 'unfilterable'.