diff options
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index c1397da61..08bb00ff6 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -647,6 +647,7 @@ do_transmit (void *cls, size_t size, void *buf) | |||
647 | session->pending_messages_tail, | 647 | session->pending_messages_tail, |
648 | pos); | 648 | pos); |
649 | GNUNET_assert (size >= pos->message_size); | 649 | GNUNET_assert (size >= pos->message_size); |
650 | /* FIXME: this memcpy can be up to 7% of our total runtime */ | ||
650 | memcpy (cbuf, pos->msg, pos->message_size); | 651 | memcpy (cbuf, pos->msg, pos->message_size); |
651 | cbuf += pos->message_size; | 652 | cbuf += pos->message_size; |
652 | ret += pos->message_size; | 653 | ret += pos->message_size; |
@@ -1089,8 +1090,11 @@ tcp_plugin_send (void *cls, | |||
1089 | 1090 | ||
1090 | /* create new message entry */ | 1091 | /* create new message entry */ |
1091 | pm = GNUNET_malloc (sizeof (struct PendingMessage) + msgbuf_size); | 1092 | pm = GNUNET_malloc (sizeof (struct PendingMessage) + msgbuf_size); |
1093 | /* FIXME: the memset of this malloc can be up to 2% of our total runtime */ | ||
1092 | pm->msg = (const char*) &pm[1]; | 1094 | pm->msg = (const char*) &pm[1]; |
1093 | memcpy (&pm[1], msg, msgbuf_size); | 1095 | memcpy (&pm[1], msg, msgbuf_size); |
1096 | /* FIXME: this memcpy can be up to 7% of our total run-time | ||
1097 | (for transport service) */ | ||
1094 | pm->message_size = msgbuf_size; | 1098 | pm->message_size = msgbuf_size; |
1095 | pm->timeout = GNUNET_TIME_relative_to_absolute (timeout); | 1099 | pm->timeout = GNUNET_TIME_relative_to_absolute (timeout); |
1096 | pm->transmit_cont = cont; | 1100 | pm->transmit_cont = cont; |