toolong icon indicating copy to clipboard operation
toolong copied to clipboard

Very high CPU usage when piping

Open widogg opened this issue 2 years ago • 3 comments

Hi! First time user, I just found this (pretty cool) tool and started using it right away.

I noticed a high CPU usage, which I think might be related to #17.

I'm using dpkg.log here as an example, but happen with other files too. When I do tl /var/log/dpkg.log, I have very low CPU usage and I can see the app normally, like this image

However, if I do cat /var/log/dpkg.log | tl, I get a very VERY high cpu usage image

Sorry the command is not fully displayed, but it definetly running tl here.

Also, I have to double ctrl+c to exit, which throws this error image

widogg avatar Mar 26 '24 20:03 widogg

I have the same problem, double ctrl+c to exit, and the terminal will display inputs of my mouse, like this 2024-08-27_11-08

I found add line sys.exit() in this function can fix this problem(exclude high cpu usage). I am a beginner of python, not really sure if this is the right modification.

Ins1nuatE avatar Aug 27 '24 03:08 Ins1nuatE