I was noticing that xdg-mime was very slow on one system; this turned out to be a server where I did not have a desktop environment, so xdg-mime was going through all of its DE checks every time. Commenting out the calls to “xprop” fixed it; perhaps because I was ssh-ing into the system, and hence xprop was querying my local X server over the net? In any case, xdg-mime shouldn’t run a command that could wait for multiple seconds like this, at least not just to diagnose its environment.