Mercurial > pidgin.yaz
view src/protocols/oscar/.todo @ 12233:02833a0ae716
[gaim-migrate @ 14535]
SF Patch #1367116 from Michael Carlson
"In profiling gaim, I noticed that on simply starting
CVS gaim, xmlnode_insert_child is using up by far the
most CPU time. After some testing, I realized the
reason why: xmlnode_insert_child is called some 18,000
times on startup, and it is inserting the child at the
end of the list each time, simply by traversing through
the entire linked list. Sometimes this list can have as
many as 800 elements.
This patch adds a variable to the _xmlnode struct,
lastchild, which simply keeps track of the last node in
the list of children. This is then used by
xmlnode_insert_child to insert at the end of the list,
instead of traversing through the whole list each time.
The two relevant functions in xmlnode.c that need to be
updated to keep track of this function appropriately
have been updated.
Running 3 times with and without the change, the
results from oprofile say it all. Here are the measured
number of clock cycles / % of total clock cycles /
function used to simply start and close gaim before the
change:
204 60.7143 xmlnode_insert_child
210 61.4035 xmlnode_insert_child
230 61.8280 xmlnode_insert_child
And after (note that one time no clock cycles were
caught at all)
3 2.5862 xmlnode_insert_child
3 2.5641 xmlnode_insert_child
This affects other areas of the program than just
starting up, but this seems to be the most noticeable
place."
Speed is good. As I was verifying this patch, I added some g_return_val_if_fail() checks.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 27 Nov 2005 03:42:39 +0000 |
parents | 5ec3bd74a3b3 |
children | e66846dafeca |
line wrap: on
line source
<todo version="0.1.19"> <note priority="high" time="1036040788"> watch for aol's upcoming increased aim/icq merge </note> <note priority="medium" time="1036040405"> AIM <note priority="high" time="1036040899"> option to ignore chat room invitations. (this is something you could vary conceivably want to be done per account, so perhaps a protocol action would be best) </note> <note priority="medium" time="1092939731"> buddies in Recent Buddies don't seem to delete right </note> <note priority="low" time="1036040980"> direct im <note priority="medium" time="1063208078" done="1089237715"> im image currently broke <comment> marv fixed this i think? </comment> </note> <note priority="veryhigh" time="1036040919"> some way to close direct connect w/out closing convo. </note> <note priority="low" time="1036040970"> canceled direct im should still allow new attempt </note> <note priority="low" time="1036041084"> failed direct im attempt should allow new attempt some way to cancel an attempt that isn't happening </note> </note> <note priority="low" time="1036041105"> Colors in Chat room are wrong (using Gold too much) </note> <note priority="verylow" time="1036041121"> Voice Chat </note> </note> <note priority="medium" time="1036040416"> ICQ <note priority="veryhigh" time="1036041206"> more privacy options </note> <note priority="veryhigh" time="1036041223"> increased authorization support <note priority="low" time="1038877526" done="1048144786"> add option to add person who just added you to your own list <comment> This was done sometime in January. </comment> </note> <note priority="medium" time="1038877503"> add info to dialog requesting autorization to allow you to check the info of the person who is requesting </note> </note> <note priority="high" time="1036041199"> color support </note> <note priority="high" time="1036041251"> set status message and of course when gaim can set them, it needs to be able to get the ones it sets. (yes this is redundant. its a reflection of my current mood) </note> <note priority="medium" time="1036041165"> Chat (this is different from aim chat) </note> <note priority="medium" time="1036041190"> New User Registration </note> <note priority="medium" time="1036041215"> more info support </note> <note priority="medium" time="1036041260"> search for users </note> <note priority="low" time="1036041152"> set the Nickname to be the self-alias </note> <note priority="low" time="1092939688"> icq i18n without breaking aim </note> <note priority="verylow" time="1036041174" done="1129563140"> File Transfer (do we really want this?) <comment> summer of code </comment> </note> </note> <note priority="medium" time="1036040870"> The order of groups and buddies in the server list is not updated when groups and buddies are re-arranged locally in Gaim. </note> </todo>