diff options
| author | Robby Zambito <contact@robbyzambito.me> | 2026-01-12 09:37:24 -0500 |
|---|---|---|
| committer | Robby Zambito <contact@robbyzambito.me> | 2026-01-12 09:37:47 -0500 |
| commit | 7bcc0c19aa713e2570d2c6b418f6ef27b79b8fda (patch) | |
| tree | b53db8abf77b34893c631fac767373adb034d809 /src/Server/Client.zig | |
| parent | 72e7df5d5cc56b402f86dbb31b79703bb47dacf1 (diff) | |
Significant speed improvement
Diffstat (limited to 'src/Server/Client.zig')
| -rw-r--r-- | src/Server/Client.zig | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/Server/Client.zig b/src/Server/Client.zig index 6ad1804..77034fd 100644 --- a/src/Server/Client.zig +++ b/src/Server/Client.zig @@ -40,16 +40,6 @@ pub fn start(self: *Client, io: std.Io) !void { std.debug.assert(self.to_client.end == 0); while (true) { self.to_client.end = try self.recv_queue.get(io, self.to_client.buffer, 1); - // Wait 1 nanosecond to see if more data is in the queue. - // If there is, add it to the write buffer before sending it. - // The reason for this is because if we send the first chunk as soon as we get it, - // we will likely be sending a partial message, which will end up being way slower. - try io.sleep(.fromNanoseconds(1), .awake); - self.to_client.end += try self.recv_queue.get( - io, - self.to_client.buffer[self.to_client.end..], - 0, - ); try self.to_client.flush(); } } |
