[Psi-Devel] Bug#450736: psi: Sending GPG-encrypted messages is delayed by 4 seconds
Andreas Ntaflos
daff at pseudoterminal.org
Mon Nov 12 16:28:40 PST 2007
On Tuesday 13 November 2007 00:24:03 Justin Karneges wrote:
> On Monday 12 November 2007 2:37 pm, Christoph Haas wrote:
> > Jan,
> >
> > On Mon, Nov 12, 2007 at 11:19:03PM +0100, Jan Niehusmann wrote:
> > > On Fri, Nov 09, 2007 at 08:28:39PM +0100, Christoph Haas wrote:
> > > > When enabling GPG encryption and sending a message it takes 4 seconds
> > > > until the message gets sent. During that time the program is
> > > > unresponsive. This does not happen when sending messages without
> > > > encryption. This also did not happen with Psi 0.10.
> > >
> > > I forwarded the report upstream (see
> > > http://lists.affinix.com/pipermail/psi-devel-affinix.com/2007-November/
> > >00 7502.html), and it seems like other people had similar issues. The
> > > cause is not yet known, though.
> >
> > Thanks for forwarding.
> >
> > > Please also not the posting at
> > > http://lists.affinix.com/pipermail/psi-devel-affinix.com/2007-November/
> > >00 7542.html where Justin is asking for some clarification.
> >
> > As a test I just downgraded Psi to 0.10-3 again while leaving everything
> > else identical on my system. The delay was gone. If I send myself a
> > message without encryption there is no noticable delay. Enabling
> > encryption adds a hardly noticeable delay of ~200ms. But that's nothing
> > compared to 4s with version 0.11.
> >
> > So I suspect it's the way that 0.11 calls gnupg. I don't think the
> > "blocked UI" issue should be fixed - rather the cause for the delay
> > making encryption take ~20 times longer. I'm running on gnupg 1.4.6 with
> > gnupg-agent 2.0.7 here.
> >
> > Thanks for taking care of the bug.
>
> Hmm, I think I know what is happening. qca-gnupg is very slow with keyid
> lookups. It hits gpg --list-keys whenever you do anything at all, and that
> can really slow things down, particularly if you have a large keyring. I
> think a lookup happens for every encrypted message. These key lookups are
> performed synchronously, which explains the frozen UI.
>
> In Psi 0.10, the gpg keys were in-memory cached and the keyring files were
> monitored for changes (with --list-keys only called if a change is
> detected), which is a far more efficient approach. qca-gnupg is based on
> Psi 0.10's gpg code, but as is common with a lot of our Psi 0.11 Qt 3 -> Qt
> 4 porting, many things got lost in the transition.
>
> Solving this problem is a matter of optimizing qca-gnupg, which fortunately
> can be done independent of Psi now that the code is separated out into a
> plugin.
That is real good news! It would explain why a friend of mine, who has only
three or four keys in his keyring never notices the problem, while I, with
around 440 keys in my keyring (KMail imports public keys automatically),
experience a very noticeable delay.
Thank you Justin for figuring out what the problem is. I am looking forward to
testing a fix once it exists :) Please drop a note to the list if there is
something we users can do to help.
Andreas
--
Andreas "daff" Ntaflos
Vienna, Austria
GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC 7E65 397C E2A8 090C A9B4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.affinix.com/pipermail/psi-devel-affinix.com/attachments/20071113/4bb535af/attachment.pgp
More information about the Psi-Devel
mailing list