diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-01 01:05:35 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-01 01:05:35 +0200 |
commit | 777e57cfce5f0d688d4147bf183723d539db6134 (patch) | |
tree | 07c6f0bb971df5d7ae317e9f2a84b3dbbcec5a94 /src/gns | |
parent | 9f03df3be26e78853cc0d2288d2260b9032126cb (diff) | |
download | gnunet-777e57cfce5f0d688d4147bf183723d539db6134.tar.gz gnunet-777e57cfce5f0d688d4147bf183723d539db6134.zip |
note on why gnunet-gns can be slow
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/gns_tld_api.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gns/gns_tld_api.c b/src/gns/gns_tld_api.c index e62bc437d..c4bf78477 100644 --- a/src/gns/gns_tld_api.c +++ b/src/gns/gns_tld_api.c | |||
@@ -128,8 +128,7 @@ static void | |||
128 | eat_tld (char *name, const char *tld) | 128 | eat_tld (char *name, const char *tld) |
129 | { | 129 | { |
130 | GNUNET_assert (0 < strlen (name)); | 130 | GNUNET_assert (0 < strlen (name)); |
131 | if ((NULL == tld) || | 131 | if ((NULL == tld) || (strlen (name) == strlen (tld))) |
132 | (strlen (name) == strlen (tld))) | ||
133 | { | 132 | { |
134 | strcpy (name, GNUNET_GNS_EMPTY_LABEL_AT); | 133 | strcpy (name, GNUNET_GNS_EMPTY_LABEL_AT); |
135 | } | 134 | } |
@@ -337,7 +336,10 @@ GNUNET_GNS_lookup_with_tld (struct GNUNET_GNS_Handle *handle, | |||
337 | } | 336 | } |
338 | GNUNET_free (dot_tld); | 337 | GNUNET_free (dot_tld); |
339 | } | 338 | } |
340 | 339 | /* FIXME: this call is still shitty slow to do the longest | |
340 | prefix if we have thousands of egos. We should modify | ||
341 | the IDENTITY API to do the longest prefix matching | ||
342 | inside of the identity service and not do an O(n) IPC! */ | ||
341 | ltr->id_co = | 343 | ltr->id_co = |
342 | GNUNET_IDENTITY_connect (ltr->gns_handle->cfg, &identity_zone_cb, ltr); | 344 | GNUNET_IDENTITY_connect (ltr->gns_handle->cfg, &identity_zone_cb, ltr); |
343 | if (NULL == ltr->id_co) | 345 | if (NULL == ltr->id_co) |