[Pidgin] #14290: Patch: Do not create useless PurpleStatus-es for every PurplePresence

Pidgin trac at pidgin.im
Mon Jun 13 05:18:23 EDT 2011


#14290: Patch: Do not create useless PurpleStatus-es for every PurplePresence
--------------------------+-------------------------------------------------
 Reporter:  hanzz         |     Owner:  rekkanoryo
     Type:  patch         |    Status:  new       
Component:  unclassified  |   Version:  2.8.0     
 Keywords:                |  
--------------------------+-------------------------------------------------
 Hi,

 Current situation:

 currently Libpurple creates PurpleStatus for every PurpleStatusType
 supported by particular prpl per every PurplePresence. This wastes the
 memory, because most of PurpleBuddies are a) offline, b) does not have
 mood/tune set, c) does not switch over *all* status-types during one
 session.

 Solution:

 Attached patch creates PurpleStatus for specific PurpleStatusType only
 when it's needed by prpl/UI.

 Note that I changes semantics of purple_presence_get_status and
 purple_account_get_status functions and therefore it should be used
 probably in 3.x.y branch.

 I will port it to 3.x.y as soon as I get monotone on this computer. This
 ticket is more about the idea itself then about having it in 2.8.x branch.

 Stats:

 For my single ICQ account (360 buddies) it saves 2MB. At work where I use
 more accounts with more buddies (lazy to count) it saves 8MB.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/14290>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list