I use ack (sometimes distributed as ack-grep) to search a complex code directory, images, who knows what else, and it reacts rather slowly. How can I diagnose what he is looking for, which makes him slow so that I can ignore him?
I only realized that the reasons why my ack-grep is slow will probably make grep slow for the same reason, so I changed the name of the title to refer to both.
The current alias for the ack-grep command is:
function view ()
{
echo "ack-grep -i $@ // ignoring third-party directories"
ack-grep -i --ignore-dir=third-party --ignore-dir="unclean-files" --ignore-dir=FCKeditor --ignore-dir=smarty --ignore-dir=codepress --ignore-dir=yui "$@"
}
So, I am doing a case insensitive search on some line through this alias, for example. view "Oops! Required fields"ignoring some directories.
I assume that I can really use the “verbose” mode for grep or ack-grep so that I can visually see the subdirectories that it hangs around because they are slowly looking.
Kzqai source
share