Bug 28390 - Modifying any account flushes every account to storage
Summary: Modifying any account flushes every account to storage
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/wj...
Whiteboard: r+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-06-04 10:54 UTC by Will Thompson
Modified: 2010-06-16 06:02 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2010-06-04 10:54:14 UTC
I noticed today that when I toggle an account from enabled to disabled there's a load of D-Bus traffic. Bustle diagram attached. For each account:

method call sender=:1.198 -> dest=org.freedesktop.secrets serial=7396 path=/org/freedesktop/secrets; interface=org.freedesktop.Secret.Service; member=Unlock
   array [
      object path "/org/freedesktop/secrets/aliases/default"
   ]

followed by CreateItem for each account's secrets.

Vivek says:

“I gave up trying to figure out why mc keeps trying to flush state to disc like that. My best guess is it's pushing the status/presence of the account in an idle whenever it changes.

“it'll be decidedly non-trivial to fix, though, I reckon. invasive and messy.”
Comment 1 Will Thompson 2010-06-06 08:42:47 UTC
Unfortunately this also happens when I sign in, which entails about 30 seconds of my hard disk thrashing. Perhaps it's updating NormalizedName or the avatar token.

I think gnome-keyring must fsync() or similar on every CreateItem() call, and MC makes 384 pairs of Unlock()/CreateItem() calls when I sign in with 6 accounts.
Comment 2 Will Thompson 2010-06-09 05:57:17 UTC
Here is a branch which doesn't fix the flushing of unchanged passwords to storage, but does fix flushing all accounts whenever one changes. This reduces the pairs of calls on the keyring when I log in from 384 to 9.
Comment 3 Simon McVittie 2010-06-15 09:38:49 UTC
We don't need to break libmission-control-plugins API immediately. Here's a version of your branch that adds an optional commit_one() method instead of changing commit():

http://git.collabora.co.uk/?p=user/smcv/telepathy-mission-control-smcv.git;a=shortlog;h=refs/heads/only-flush-changed-accounts

With that change, I approve.
Comment 4 Will Thompson 2010-06-15 09:57:18 UTC
(In reply to comment #3)
> We don't need to break libmission-control-plugins API immediately. Here's a
> version of your branch that adds an optional commit_one() method instead of
> changing commit():
> 
> http://git.collabora.co.uk/?p=user/smcv/telepathy-mission-control-smcv.git;a=shortlog;h=refs/heads/only-flush-changed-accounts
> 
> With that change, I approve.

I endorse this initiative!
Comment 5 Simon McVittie 2010-06-16 06:02:35 UTC
Fixed in 5.5.2.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.