Hi Patrik,

On 04/19/2013 10:21 AM, Patrik Flykt wrote:
On Thu, 2013-04-18 at 13:52 +0200, Daniel Wagner wrote:
+static struct policy_data *find_policy(const char *ident)
+{
+       GSList *list;
+       struct policy_data *policy;
+
+       for (list = policy_list; list != NULL; list = list->next) {
+               policy = list->data;
+
+               if (g_strcmp0(policy->ident, ident) != 0)
+                       continue;
+
+               return policy;
+       }
+
+       return NULL;
+}
+

In this and the previous patch 05/11, is a singly linked list the
appropriate data structure for policy_data? How many policy_data structs
are we looking at for a worst case IVI setup?

IIRC, in our current setup we have around 40-50 applications. But I expect that in future we will have less individual application. The trend is to use some sort of communication middleware. ConnMan will see only the middleware in such a setup.

I would suggest we stay with the link list at this point. If we hit a performance bottleneck we can still change the container type.

cheers,
daniel

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to