Merge lp:~nafai/gwibber/gnomekeyring-fix into lp:gwibber
|Merged at revision:||not available|
|Diff against target:||
187 lines (+75/-18)
4 files modified
|To merge this branch:||bzr merge lp:~nafai/gwibber/gnomekeyring-fix|
Description of the Change
This is a proposed fix for bug #554005.
Since accessing Gnome Keyring from threads causes a spike in CPU
usage, I have moved the access to gnome-keyring to the start of
gwibber-service, before threads are started. This section loads the
passwords from the keyring into a dictionary and then provides a
method for lookup. Then the calls to gnomekeyring are replaced with a
call to that method.
This patch handles the CPU pegging problem, but isn't a complete fix.
The following needs still to be done:
1) pitti proposed that the memory where this is stored should be
mlock()'d. He suggested we use ctypes to wrap the calls to mlock
and munlock. I've included stub functions, and pitti indicated he
could help with wrapping this.
2) This implementation only reads the accounts and their passwords at
the beginning of gwibber-service. The previous implementation
caught changes to the passwords as well as the addition and removal
of accounts by whenever actions are taken. Code still needs to be
added to handle this. There are a couple of options that I can
a) Start and restart the gwibber service when these changes are
made (in gwibber/
are unforseen problems with this -- for example,
How does the main gwibber process handle loosing the gwibber
b) Add a method to the com.Gwibber.
updating or adding account information (id and password). This
method would then call a function we could add to
The problem I see with this is that other developers who may
look at the dbus services may assume this actually changes the
passwords, not just the in-memory data structure.
I imagine either of these options shouldn't be too hard to
implement. I'm hoping that Ken or someone else can find a quick
way to do this.
- 712. By Travis B. Hartwell on 2010-04-08
Merge Ken's threading changes and other updates.
- 713. By Travis B. Hartwell on 2010-04-08
Move loading account passwords to the Dispatcher class and expose it
- 714. By Travis B. Hartwell on 2010-04-08
Access mlock/munlock via ctypes.
- 715. By Travis B. Hartwell on 2010-04-08
Call munlock properly
- 716. By Travis B. Hartwell on 2010-04-08
Clean-ups per pitti's suggestions.