[Asterisk-code-review] pbx: Create pbx include.c for management of 'struct ast incl... (asterisk[master])
Kevin Harwell
asteriskteam at digium.com
Thu Jul 14 17:34:29 CDT 2016
Kevin Harwell has posted comments on this change.
Change subject: pbx: Create pbx_include.c for management of 'struct ast_include'.
......................................................................
Patch Set 2:
>"Although ast_walk_context_includes is maintained the procedure is no longer efficient except for the first call (inc==NULL)."
Is the inefficiency a real concern for calling scenarios? Also curious as to why the switch to a vector in the first place? Is it warranted if their are efficiency issues?
> "I'm unsure the best approach to efficiently provide this functionality as it would require an API change."
Would this work: Add an index variable to the ast_include structure? Then ast_walk_context_includes would just be a call to vector get at the given inc->index + 1. The main problem I see here is upon an element being removed and the vector gets reordered. However in the 'walk' function a reset of the next element's index could be done if it differs more than +1 from the previous one so the next call wouldn't potentially skip elements. Thoughts?
--
To view, visit https://gerrit.asterisk.org/3207
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib5c882e27cf96fb2aec67a39c18b4c71c9c83b60
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: No
More information about the asterisk-code-review
mailing list