[Pidgin] #13381: Rearranging Custom Smileys

Pidgin trac at pidgin.im
Mon Feb 25 19:44:20 EST 2013

#13381: Rearranging Custom Smileys
 Reporter:  Mythology  |       Owner:  salinasv
     Type:  defect     |      Status:  new
Milestone:             |   Component:  custom emoticons
  Version:  2.7.10     |  Resolution:
 Keywords:             |

Comment (by salinasv):

 I see the problem.

 At startup, we are reading the smileys.xml file and storing the
 information on a hash table. At Syncup time, we create the xml from a
 g_hash_table_foreach() function so we don't really have control over the
 order in which the smileys get out of the hash table.

 This was decided this way to improve performance and it is a good thing.

 I have thought some alternatives to get the behavior you are looking for,
 but they all impact performance or memory footprint.

 One is to have a ordered linked list of smileys in the smiley subsystem
 and at syncup look for each of the smileys from the hash table (in order)
 and then write the xml. This can make it possible to define some arbitrary
 order too.

 Other is to read the xml at syncup and reconstruct the write xml file in
 order as we read the old one, append the new ones (the ones we find in the
 hash table when the old xml is finished) and write back.

 Still not sure if we want to have that performance/footprint impact to
 solve this minor inconvenience.

Ticket URL: <https://developer.pidgin.im/ticket/13381#comment:5>
Pidgin <http://pidgin.im>

More information about the Tracker mailing list