[sr-dev] git:master: modules_k/rls: RLS DB-only mode performance improvements

Peter Dunkley peter.dunkley at crocodile-rcs.com
Mon Mar 19 17:12:40 CET 2012


Module: sip-router
Branch: master
Commit: 6d7e23db563b7ba70701e21928def9c228c30520
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6d7e23db563b7ba70701e21928def9c228c30520

Author: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Date:   Mon Mar 19 16:05:56 2012 +0000

modules_k/rls: RLS DB-only mode performance improvements

- When the RLS 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 rls_db.c) and
  re-orders the functional code in other files to make the DB
  operations as simple as possible and as few as few as possible.

---

 modules_k/rls/notify.c          |    6 +-
 modules_k/rls/resource_notify.c |   34 +-
 modules_k/rls/rls.h             |   17 +-
 modules_k/rls/rls_db.c          |  994 ++++++++++++++-------------------------
 modules_k/rls/subscribe.c       |  149 ++++---
 5 files changed, 459 insertions(+), 741 deletions(-)

Diff:   http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=6d7e23db563b7ba70701e21928def9c228c30520



More information about the sr-dev mailing list