Summary: | ASTERISK-20386: Named call pickup groups implementation improvements. | ||
Reporter: | Richard Mudgett (rmudgett) | Labels: | |
Date Opened: | 2012-09-07 11:50:09 | Date Closed: | 2012-09-20 12:16:27 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | 11.0.0-beta1 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | 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. | ||
Comments: |