When spawning agent and dirmngr the gnupg should use exponential backoff when testing the spawned process for readiness. The current code makes the gnupg to wait unnecessarily long time on non-busy systems. This attached patch solves the problem.
Revisions and Commits
This was actually implemented in a similar way for T3490.
However, we also need to look at the locking code which needs a similar solution in the common case (Kleopatra) that several processes are trying to start gpg-agent. In fact there we also need some randomization of the wait time.