[Asterisk-code-review] res pjsip: Improve CLI completion performance (asterisk[13])

Sean Bright asteriskteam at digium.com
Fri Nov 3 15:35:05 CDT 2017


Sean Bright has uploaded a new patch set (#2). ( https://gerrit.asterisk.org/6988 )

Change subject: res_pjsip: Improve CLI completion performance
......................................................................

res_pjsip: Improve CLI completion performance

Previously, this code would duplicate the target ao2 container and
iterate it for each of the objects within it. For a small number of
objects this was fine, but as the number of objects grows the
performance degrades quickly. For 4000 endpoints, the completion of:

  pjsip show endpoint <tab>

Takes over 10 minutes on my development workstation.

This patch adds a cache of a given command's possible completions in
thread local storage for more performant iteration and retrieval. 4000
endpoints are now completed in under 1 second on my development machine.

Change-Id: Ib6fdeb5283b7c1c66df22c0fa08e95524bf55011
---
M res/res_pjsip/pjsip_cli.c
1 file changed, 130 insertions(+), 71 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/88/6988/2
-- 
To view, visit https://gerrit.asterisk.org/6988
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib6fdeb5283b7c1c66df22c0fa08e95524bf55011
Gerrit-Change-Number: 6988
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171103/609b36a0/attachment.html>


More information about the asterisk-code-review mailing list