rsocket-net icon indicating copy to clipboard operation
rsocket-net copied to clipboard

Logging is slowing down execution

Open chaseaucoin opened this issue 4 years ago • 1 comments

The logging on every call takes a lot of time. Doing 10,000 request responses of static text "OK" takes 1.8426/ms per request which is abysmal for a 2 byte package. I see no clear options to disable this. If there is already a way to disable please let me know.

Expected Behavior

Ability to turn off logging

Actual Behavior

No ability to turn off logging (that I can see)

Steps to Reproduce

Follow the demo project, echo OK for 10,000 iterations

@Test
public void reproCase() {

}

Possible Solution

Provide ability to disable logging

Your Environment

  • RSocket version(s) used:
  • Other relevant libraries versions (eg. netty, ...):
  • Platform (eg. JVM version (javar -version) or Node version (node --version)):
  • OS and version (eg uname -a):

chaseaucoin avatar Feb 06 '21 19:02 chaseaucoin

In RSocketProtocol.Handler.cs

updating static void Decoded(string message) => Console.WriteLine(message); to static void Decoded(string message) { }

improved speed from 1.8426/ms per request to 0.2480/ms per request

But that still feels very slow for a local loopback for a 2 byte message

chaseaucoin avatar Feb 06 '21 23:02 chaseaucoin