I am running this command: # cat /dev/urandom | hexdump -C | tail -n100000 On Android tail command pops up in top with ~75% CPU. As a comparison, on FreeBSD hexdump pops up in profile with ~100% CPU, as it should be. Generating the hex dump should require much more work, because the program needs to print separate bytes as combinations of 2-3 characters. And tail only needs to scan a buffer for a newline character, and keep the appropriate rolling buffer. tail needs to be improved to work faster. NOTE On Android tail takes 75% CPU and not 100% CPU because the random number generator in Android is also slow (not a BusyBox problem). Otherwise it would have been 100% as well. # tail --help BusyBox v1.21.0 (2013-07-08 16:00:47 CEST) multi-call binary.
I don't want to have 300 bugs "applet <foo> needs to be improved".
Ok, but how is this going to be fixed? This must be a problem specific to tail.
(In reply to comment #2) > Ok, but how is this going to be fixed? This must be a problem specific to tail. Maybe you can help?
Also I don't think such Bug should be closed as invalid, because it is valid. It should rather be set to 'wishlist' status.
(In reply to comment #4) > Also I don't think such Bug should be closed as invalid, because it is valid. > It should rather be set to 'wishlist' status. Look. So far you did nothing to help with this "bug" or "performance problem" or whatever you call it. You can't demand that *other people* work on things *you* consider to be problems. If you have a patch, please post it. Otherwise, stop pushing me.
I reported the problem. This is the first step. And the problem is valid. The second step is to look into it. I said I will help. You closed the Bug as invalid, this doesn't make sense, because it is valid. I am not pushing you to fix anything, just to keep correct records.
I did valgrind profiling, and found that most time is spent in memmove function. tail should not call memmove at all.