Description of problem: common/asshelp.c:start_new_gpg_agent does (skipping error handling and similar non-important code): > err = gnupg_spawn_process_detached (program? program : agent_program, > argv, NULL); > for (i=0; i < SECS_TO_WAIT_FOR_AGENT; i++) > { > gnupg_sleep (1); > err = assuan_socket_connect (ctx, sockname, 0, 0); > if (!err) > break; > } As a result, even when the agent is ready to accept a connection very quickly (less than 2 ms in my case), gpg2 is waiting for a _whole second_ before trying to connect at all. This extremely noticeably slows down automated gpg runs, where each run creates a new $GNUPGHOME and imports a set of keys into it. Please speed this up, perhaps implementing exponential backoff (1/2/4/8/… ms up to the current 1 s, or so), or perhaps teaching gpg-agent to close a single-purpose pipe after its listen() succeeds, so that gpg-agent can create such a p ipe and block until it is closed = try to connect as soon as possible instead of having to guess how long to wait. Version-Release number of selected component (if applicable): gnupg2-2.1.13-2.fc24.x86_64 (observation) gnupg2-2.1.18-2.fc26.src.rpm (examined source code) Steps to Reproduce: 1. mkdir t 2. (time GNUPGHOME=$(pwd)/t gpg2 --list-keys) 3. (time GNUPGHOME=$(pwd)/t gpg2 --import < ~/.gnupg/pubring.gpg) 3. (time GNUPGHOME=$(pwd)/t gpg2 --import < ~/.gnupg/pubring.gpg) Actual results: 2. takes 0.004 seconds (all values real time) 3. autostarts the agent, and takes 1.012 seconds 4. reuses an existing agent, and takes 0.013 seconds Expected results: 3. takes less than, say, 0.30 seconds
gnupg2-2.1.20-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f2b99a5ac7
gnupg2-2.1.20-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f2b99a5ac7
gnupg2-2.1.20-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f2b99a5ac7
gnupg2-2.1.20-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f2b99a5ac7
gnupg2-2.1.20-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
Thanks for the fix. Has it been sent upstream?
Now it has https://dev.gnupg.org/T3380
Thanks again!