To give the user some feedback when it's taking some time, show a progress bar and the path currently being measured (or something like that).
It's important to detect the type of the terminal, so as to avoid issues when piping to other programs (grep, awk, etc.).