[asterisk-bugs] [JIRA] Assigned: (ASTERISK-20386) Named call pickup groups implementation improvements.
Richard Mudgett (JIRA)
noreply at issues.asterisk.org
Fri Sep 14 09:55:27 CDT 2012
[ https://issues.asterisk.org/jira/browse/ASTERISK-20386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Mudgett reassigned ASTERISK-20386:
------------------------------------------
Assignee: Richard Mudgett
> Named call pickup groups implementation improvements.
> -----------------------------------------------------
>
> Key: ASTERISK-20386
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-20386
> Project: Asterisk
> Issue Type: Improvement
> Security Level: None
> Components: Core/General
> Affects Versions: 11.0.0-beta1
> Reporter: Richard Mudgett
> Assignee: Richard Mudgett
>
> The implementation of the struct ast_namedgroups leaves something to be desired. There are a lot of little allocations that do not need to be done.
> 1) The struct ast_namedgroups is opaque everywhere which is good. However, inside the implementation methods, it could just simply be cast to a struct ao2_container pointer.
> 2) The struct namedgroup_entry could be redefined so the name does not have to be separately allocated:
> {code}
> struct namedgroup_entry {
> /*! pre-built hash of groupname string */
> int hash;
> /*! string representation of group (End allocation of name string.) */
> char name[1];
> };
> {code}
> The struct also does not have to be publicly defined.
> 3) The ast_namedgroups_intersect() routine should iterate over the container with the fewer members. The other container just looks up the members of the first container in O(1) time.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list