Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Question about time with TCP


I noted tha TCP is quite slow. My question is once there is a connection and we have KeepConnection true there is a big overhead or not.

some time is usefull to use timesamp in packets to profile some part of code.

Ing Giuseppe Monteleone


Hello Giuseppe,

You can say that there is a factor of 20-50 in performance between logging with TCP and logging to a file. Logging with TCP is more expensive because the log packet must go through the entire TCP/network stack before the Console can receive and display it. When accurate timestamps are needed for profiling, it is thus recommended to log to a file rather than to use TCP.



how many log entries per second can you log with your current configuration? If it’s less than a few thousands per second via TCP/IP, then there’s something wrong (e.g., the library is trying to reconnect the entire time because it loses its connection).



I’m sorrry i red your article about memory performance only after I wrote the post.
Actually i use backlog (wich has speed like memory protocol, I presume) with a dummy error to dump on consolle.

Due the advantage of memory protocol could be usefull a dispatch method do flush entry to consolle. This could be usefull when used with the capability of Borland BreakPoint to execute code, for example

Merging Memory protocol and file or TCP protocol could give to Si a extreme powerfull method to profile code.

Ing Giuseppe Monteleone


Hello Giuseppe,

Thanks for the idea. It sounds indeed very interesting. I added it to our feature request list.