mq = GNUNET_malloc (sizeof (struct MessageQueue) + message_buf_size);
mq->specific_address = peer_address;
mq->client = client;
+ /* FIXME: this memcpy can be up to 7% of our total runtime! */
memcpy (&mq[1], message_buf, message_buf_size);
mq->message_buf = (const char*) &mq[1];
mq->message_buf_size = message_buf_size;
tcmc->priority = ntohl (obm->priority);
tcmc->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_ntoh (obm->timeout));
tcmc->msize = msize;
+ /* FIXME: this memcpy can be up to 7% of our total runtime */
memcpy (&tcmc[1], obmm, msize);
GNUNET_SERVER_client_keep (client);
setup_peer_check_blacklist (&obm->peer, GNUNET_YES,
session->pending_messages_tail,
pos);
GNUNET_assert (size >= pos->message_size);
+ /* FIXME: this memcpy can be up to 7% of our total runtime */
memcpy (cbuf, pos->msg, pos->message_size);
cbuf += pos->message_size;
ret += pos->message_size;
/* create new message entry */
pm = GNUNET_malloc (sizeof (struct PendingMessage) + msgbuf_size);
+ /* FIXME: the memset of this malloc can be up to 2% of our total runtime */
pm->msg = (const char*) &pm[1];
- memcpy (&pm[1], msg, msgbuf_size);
+ memcpy (&pm[1], msg, msgbuf_size);
+ /* FIXME: this memcpy can be up to 7% of our total run-time
+ (for transport service) */
pm->message_size = msgbuf_size;
pm->timeout = GNUNET_TIME_relative_to_absolute (timeout);
pm->transmit_cont = cont;
* 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise
* messages may be dropped even for a reliable transport.
*/
-#define TOTAL_MSGS (60000 * 2)
+#define TOTAL_MSGS (60000 * 20)
/**
* How long until we give up on transmitting the message?
PLUGINS = tcp
#DEBUG = YES
#PREFIX = xterm -T transport2 -e gdb --command=cmd --args
-#PREFIX = valgrind --leak-check=full
+#PREFIX = valgrind --tool=callgrind
ACCEPT_FROM6 = ::1;
ACCEPT_FROM = 127.0.0.1;
NEIGHBOUR_LIMIT = 50
#DEBUG = YES
ACCEPT_FROM6 = ::1;
ACCEPT_FROM = 127.0.0.1;
+#PREFIX = valgrind --tool=callgrind
NEIGHBOUR_LIMIT = 50
#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
BINARY = gnunet-service-transport
if (timeout->value > to.value)
*timeout = to;
}
+ /* FIXME: this is a very expensive (9% of runtime for some
+ benchmarks!) way to merge the bit sets; specializing
+ the common case where we only have one bit in the pos's
+ set should improve performance dramatically! */
if (pos->read_set != NULL)
GNUNET_NETWORK_fdset_add (rs, pos->read_set);
if (pos->write_set != NULL)
{
if (NULL == want)
return GNUNET_NO;
+ /* FIXME: this is a very expensive (10% of runtime for some
+ benchmarks!) way to merge the bit sets; specializing
+ the common case where we only have one bit in the pos's
+ set should improve performance dramatically! */
if (GNUNET_NETWORK_fdset_overlap (ready, want))
{
/* copy all over (yes, there maybe unrelated bits,