[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: even nicer queue size optim
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: even nicer queue size optimization: insert-at-tail if we can instantly tell, always |
Date: |
Thu, 23 Feb 2017 15:33:53 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 7c95ee4ac even nicer queue size optimization: insert-at-tail if we can
instantly tell, always
7c95ee4ac is described below
commit 7c95ee4ac5390170c35894687d9d9ea24e595fd1
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Feb 23 15:33:51 2017 +0100
even nicer queue size optimization: insert-at-tail if we can instantly
tell, always
---
src/datastore/datastore_api.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index b2fc18947..916e6acae 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -498,19 +498,17 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h,
struct GNUNET_DATASTORE_QueueEntry *pos;
unsigned int c;
- if ( (h->queue_size == max_queue_size) &&
+ if ( (NULL != h->queue_tail) &&
(h->queue_tail->priority >= queue_priority) )
{
- GNUNET_STATISTICS_update (h->stats,
- gettext_noop ("# queue overflows"),
- 1,
- GNUNET_NO);
- GNUNET_MQ_discard (env);
- return NULL;
+ c = h->queue_size;
+ pos = NULL;
+ }
+ else
+ {
+ c = 0;
+ pos = h->queue_head;
}
-
- c = 0;
- pos = h->queue_head;
while ( (NULL != pos) &&
(c < max_queue_size) &&
(pos->priority >= queue_priority) )
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: even nicer queue size optimization: insert-at-tail if we can instantly tell, always,
gnunet <=