aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-06-25 21:41:35 +0000
committerChristian Grothoff <christian@grothoff.org>2010-06-25 21:41:35 +0000
commit1174c809820401ec254a701b4d478a8e88b8af59 (patch)
tree6f68cc38ef9fafcc63f478fd8b71c46deace5fc0 /src/transport/plugin_transport_tcp.c
parent59921d3b90ed8bf823605517f6692c26a1c9dc44 (diff)
downloadgnunet-1174c809820401ec254a701b4d478a8e88b8af59.tar.gz
gnunet-1174c809820401ec254a701b4d478a8e88b8af59.zip
marking performance issues
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c6
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;