Module: sip-router
Branch: master
Commit: 888d1d5644a38e8c36ed706ee51015984971cc5c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=888d1d5…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Mon Mar 19 15:54:23 2012 +0000
modules_k/pua: PUA DB-only mode performance improvements
- When the PUA DB-only mode was implemented it was designed to do
(as close as possible) exactly what the hash-table mode did in
the same way the hash-table mode did it.
This means lots of hash-table lookups (which are fast) result in
lots of DB selects (which are slow). It also means where an entry
is found in the hash-table and modified in place, in DB mode a
select must be done and then an update.
A lot of these DB transactions are not strictly necessary, and
often fields were retrieved or updated in the DB even when they
hadn't changed.
- This change refactors the DB-only code (in pua_db.c) and
re-orders the functional code (in send_(publish|subscribe).c)
to make the DB operations as simple as possible and as few as
few as possible.
---
modules_k/pua/pua_db.c | 882 +++++++++++++++++-----------------------
modules_k/pua/pua_db.h | 16 +-
modules_k/pua/send_publish.c | 157 ++++----
modules_k/pua/send_subscribe.c | 298 +++++---------
4 files changed, 571 insertions(+), 782 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=888…
Module: sip-router
Branch: master
Commit: 42f2d990d022cb67b051ac563ee8cde916a0d14a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=42f2d99…
Author: Dragos Dinu <dragos.dinu(a)1and1.ro>
Committer: Anca Vamanu <anca.vamanu(a)1and1.ro>
Date: Tue Mar 13 11:33:06 2012 +0200
modules_k/presence Used affected_rows SQL statement
In case affected_rows function is available in the DB driver, this
function is used instead of an extra query in presentity table that only
verified if the record existed.
Patch author Dragos Dinu <dragos.dinu(a)1and1.ro>
---
modules_k/presence/presentity.c | 436 ++++++++++++++++++++++----------------
1 files changed, 252 insertions(+), 184 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=42f…