pass is 15x slower on one machine than another. How to debug?

Ryan Lue lists at ryanlue.com
Mon Feb 25 15:39:50 CET 2019


> 
> >     $ perf stat -d pass ls
> 
> Try to run that perf in both machines and compare then, as simple stats
> are harder to debug
> 
> Also do the same for the bash -x, or even better, to get the timmings for
> each command:
> 
> N=`date +%s%N`; export PS4='+[$(((`date +%s%N`-'$N')/1000000))ms][${BASH_SOURCE}:${LINENO}]: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'; set -x; bash -x pass ls
> 
> again, run this on both machines and compare then... or post then so
> we can check

THANK YOU. Setting $PS4 totally led me to the answer.

It turns out I had some node module installed that installed this as a
dependency:

https://www.npmjs.com/package/which

This JS clone of `which` was overriding the system executable
and taking 500ms to run. pass calls `which gpg2`, hence the extreme delays.

Still no clue why node-which takes so long on one machine but not
another, but I can live without it (and honestly prefer not to have npm
polluting my system utils).

Thanks again!

—Ryan


More information about the Password-Store mailing list