Reducing latency #1739
-
Hi, I have an application where I would like to use this library for IPC. I've already measured a nearly 2X reduction in latency over an alternative WebSocket library, with less variance also. I'm wondering if there is any scope to reduce this further. I only need to send one message (of just a few kilobytes) every few milliseconds, but I need the round-trip time to be as short as possible. I'm currently measuring around 0.16ms. Curiously, if my application is hammering the CPU, this drops down to around 0.11ms. I noticed that the thread that is running the server appears mostly idle. Does the event loop sleep and if so, is there a way to reduce or remove that sleeping? Alternatively, is there anything else I can do to reduce the round-trip time or is this the limit? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can listen over unix socket rather than over TCP. But ideally you would just use something intended for IPC like shared memory or something |
Beta Was this translation helpful? Give feedback.
Aha, well okay if you have a browser as client you most likely don't have any more to do on the backend