Can anybody explain to me why this command can return instantly but "lsof -i" sometimes takes ages to complete?
lsof has a good case to join coreutils.
$ type ls
ls is aliased to `ls --color=auto'
On slow file systems (for instance, think of shared machines with large directories, NFS and heavy load) this can take ages to give output. Instead, if you just call /bin/ls, this call only calls http://man7.org/linux/man-pages/man3/readdir.3.html and thus gives output promptly.