id summary reporter owner description type status priority milestone component version resolution keywords cc backport_to_milestone backported 937 Revamping of presence management to make it more efficient bennylp bennylp "Some issues to be fixed in the presence management in PJSUA-LIB: - {{{pjsua_pres_refresh()}}} will be called every time there is an operation to a buddy, which is not very efficient since this function scans the buddy list for modifications. - the use of {{{LOCK_BUDDIES}}}/{{{LOCK_BUDDIES}}} (introduced by #351) has been identified to have caused slow performance, especially on mobile devices, since it prevents other thread from working with different buddy object every time the main thread does something with a buddy. - buddy may need individual timer, so that refreshes do not happen all at once. - add the last subscription status code (not just reason string) in the buddy info, so that application may handle some other failures with the buddy subscription - sending of PUBLISH in relation to REGISTER - handle several cases where PJSUA-LIB should re-subscribe to buddy's presence immediately, rather than relying on the timer: - 481 response to SUBSCRIBE - subscription is terminated with ""deactivated"", ""timeout"", ""probation"", and ""giveup"" reason - note that for other cases, there is already PJSUA_PRES_TIMER timer to refresh subscriptions periodically " enhancement new normal release-1.5 pjsua-lib trunk johan emil