Feature: don't autosave blist.xml upon "last_seen" changes

immerrr again immerrr at gmail.com
Sat Mar 30 06:24:33 EDT 2013


Hi all

There's a nuisance in pidgin behaviour which has been there for ages and is
still there as of 2.10.6.  The problem is that a buddy going offline alters
"last_seen" node attribute which triggers an autosave of buddy list data, which
means occasional a) hdd spinning up from powersave and b) a notification from
Dropbox about file change if blist.xml is tracked.  It doesn't seem an issue
when buddy activity is rather scarce, but in my case -- I have over a hundred of
colleagues in my roster in different timezones, with slightly varying timetables
and, probably, some having autoaway set to "logoff" -- there's a stream of
logon/logoff events happening once in 1-2 minutes, Dropbox notifications drive
me crazy and my hdd virtually never spins down.

The issue has been reported couple of times [1,2] but there's no real activity
in those tickets and I'm fed up with it enough to tackle it myself.  Having
"last_seen" buddy attribute persistent between invocations of Pidgin is nice,
but think I'll live if any of those gets lost, so the best solution for me would
be to stop autosaving upon changing "last_seen" of a buddy and rather to save
those updates with the rest of account information, e.g. upon shutdown.  I've
skimmed through the sources of libpurple and it appears that the easiest way
would be to hack purple_blist_node_set_int() function in blist.c so that it
doesn't autosave the node if the key is "last_seen".  Obviously, this should be
customizable , so I was thinking of adding a pref with a checkbox on
"Preferences" -> "Status/Idle" tab, smth like "/purple/last_seen/autosave".

Now, there's something I'd like to ask:
- is there a better way to handle that issue, e.g. via plugin API maybe?
- is it likely to have such changes incorporated in mainline?
- in fact, any feedback and criticism is welcome, feel free.


1. https://developer.pidgin.im/ticket/10059
2. https://developer.pidgin.im/ticket/15417

--
Cheers,
immerrr




More information about the Devel mailing list