I also highly recommend plocate as an alternative to locate. It's much faster and accepts all the same flags as locate.
I use an implementation I have written in the shell itself whose database format is nothing more than every file path on the system separated by null bytes, that is simply grepped to find files; the speed difference is absurd.
—— — time locate */meme.png
/storage/home/user/pictures/macro/meme.png
real 0m0.885s
user 0m0.806s
sys 0m0.010s
—— — time greplocate /meme.png$
/storage/home/user/pictures/macro/meme.png
real 0m0.089s
user 0m0.079s
sys 0m0.011s
This implementation is highly naïve and simplistic, and offloads all the searching to GNU Grep, yet outperforms the actual `locate` command by an order of magnitude.(Disclosure: I'm the author of plocate.)
—— — true
—— — false
—— 1 sh -c 'exit 120'
120 sh -c 'exit 20'
— 20
It doesn't show the colors here of course.