[Pidgin] #4790: myspace protocol performance improvement: call strlen outside of loop in msim_unescape
Pidgin
trac at pidgin.im
Fri Feb 8 21:34:13 EST 2008
#4790: myspace protocol performance improvement: call strlen outside of loop in
msim_unescape
----------------------+-----------------------------------------------------
Reporter: oliver | Owner: jeff
Type: patch | Status: closed
Priority: minor | Milestone: 2.3.2
Component: MySpace | Version: 2.3.1
Resolution: fixed | Keywords:
Pending: 0 |
----------------------+-----------------------------------------------------
Changes (by jeff2 at soc.pidgin.im):
* milestone: => 2.3.2
Comment:
(In [72a2b71dfe259097d115f67e0442fb44934ce686]) Patch from oliver:
In message.c in the escape & unescape functions the loops are not optimal,
doing a strlen() for each character in the message string.
valgrind/callgrind identified especially msim_unescape() as a expensive
because of that (guess there is more unescaping going on than escaping).
The attached patch moves the strlen() out of the loop header for both
functions.
Closes #4790.
--
Ticket URL: <http://developer.pidgin.im/ticket/4790#comment:2>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list