[Asterisk-code-review] CLI: Improve completion performance. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Sun Nov 5 10:57:55 CST 2017


Hello Jenkins2, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/6996

to look at the new patch set (#3).

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

CLI: Improve completion performance.

* Remote consoles no longer ask for the number of matches before asking
  for the list.  Doing so caused double the work to be done.
* For functions that deal with the list of matches replace 'char **'
  with a vector of 'char *'.  The structure is very similar but the
  vector has macro's to assist with building the list and the vector
  keeps count.
* Add ast_cli_completion_vector_save to support CLI handlers providing
  all completion options in a single response to request for completion.
  Using this method is significantly faster.  It should be considered
  for CLI completions that require locking or iterating large
  containers.
* Deprecate ast_cli_generatornummatches and ast_cli_completion_matches.
* Update ast_module_helper to use ast_cli_completion_vector_save.

Change-Id: Ie527d3d5e8efcf5eaddf882db8b1f904e86543a8
---
M include/asterisk/cli.h
M include/asterisk/vector.h
M main/asterisk.c
M main/cli.c
M main/loader.c
M tests/test_substitution.c
6 files changed, 389 insertions(+), 278 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/96/6996/3
-- 
To view, visit https://gerrit.asterisk.org/6996
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie527d3d5e8efcf5eaddf882db8b1f904e86543a8
Gerrit-Change-Number: 6996
Gerrit-PatchSet: 3
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171105/1e9532b4/attachment.html>


More information about the asterisk-code-review mailing list