note on why gnunet-gns can be slow
authorChristian Grothoff <christian@grothoff.org>
Fri, 31 May 2019 23:05:35 +0000 (01:05 +0200)
committerChristian Grothoff <christian@grothoff.org>
Fri, 31 May 2019 23:05:35 +0000 (01:05 +0200)
src/gns/gns_tld_api.c

index e62bc437d9da0a762538f129c3add5a17db779f8..c4bf784774e1406ef63fe79e4fa84908cbd6e651 100644 (file)
@@ -128,8 +128,7 @@ static void
 eat_tld (char *name, const char *tld)
 {
   GNUNET_assert (0 < strlen (name));
-  if ((NULL == tld) ||
-      (strlen (name) == strlen (tld)))
+  if ((NULL == tld) || (strlen (name) == strlen (tld)))
   {
     strcpy (name, GNUNET_GNS_EMPTY_LABEL_AT);
   }
@@ -337,7 +336,10 @@ GNUNET_GNS_lookup_with_tld (struct GNUNET_GNS_Handle *handle,
     }
     GNUNET_free (dot_tld);
   }
-
+  /* FIXME: this call is still shitty slow to do the longest
+     prefix if we have thousands of egos. We should modify
+     the IDENTITY API to do the longest prefix matching
+     inside of the identity service and not do an O(n) IPC! */
   ltr->id_co =
     GNUNET_IDENTITY_connect (ltr->gns_handle->cfg, &identity_zone_cb, ltr);
   if (NULL == ltr->id_co)