diff options
Diffstat (limited to 'src/util/scheduler.c')
-rw-r--r-- | src/util/scheduler.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index b94152025..5a10987ac 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -306,6 +306,10 @@ update_sets (struct GNUNET_SCHEDULER_Handle *sched, | |||
306 | if (timeout->value > to.value) | 306 | if (timeout->value > to.value) |
307 | *timeout = to; | 307 | *timeout = to; |
308 | } | 308 | } |
309 | /* FIXME: this is a very expensive (9% of runtime for some | ||
310 | benchmarks!) way to merge the bit sets; specializing | ||
311 | the common case where we only have one bit in the pos's | ||
312 | set should improve performance dramatically! */ | ||
309 | if (pos->read_set != NULL) | 313 | if (pos->read_set != NULL) |
310 | GNUNET_NETWORK_fdset_add (rs, pos->read_set); | 314 | GNUNET_NETWORK_fdset_add (rs, pos->read_set); |
311 | if (pos->write_set != NULL) | 315 | if (pos->write_set != NULL) |
@@ -332,6 +336,10 @@ set_overlaps (const struct GNUNET_NETWORK_FDSet *ready, | |||
332 | { | 336 | { |
333 | if (NULL == want) | 337 | if (NULL == want) |
334 | return GNUNET_NO; | 338 | return GNUNET_NO; |
339 | /* FIXME: this is a very expensive (10% of runtime for some | ||
340 | benchmarks!) way to merge the bit sets; specializing | ||
341 | the common case where we only have one bit in the pos's | ||
342 | set should improve performance dramatically! */ | ||
335 | if (GNUNET_NETWORK_fdset_overlap (ready, want)) | 343 | if (GNUNET_NETWORK_fdset_overlap (ready, want)) |
336 | { | 344 | { |
337 | /* copy all over (yes, there maybe unrelated bits, | 345 | /* copy all over (yes, there maybe unrelated bits, |