1
0
mirror of https://github.com/redis/go-redis.git synced 2025-09-05 20:24:00 +03:00
Commit Graph

6 Commits

Author SHA1 Message Date
Nedyalko Dyakov
af6a103457 feat(push): reading optimization for Linux
Optimize the peeking on newly acquired connection on *unix. Use syscall
to peek on the socket instead of blocking for a fixed amount of time.
This won't work on Windows, hence the `MaybeHasData` will always return
true on Windows and the client will have to block for a given time to
actually peek on the socket.

*Time to complete N HSET operations (individual commands)*

| Batch Size | Before (total sec) | After (total sec) | Time Saved | % Faster |
|------------|-------------------|------------------|------------|----------|
| 100 ops    | 0.0172           | 0.0133           | 0.0038     | **22.4%** |
| 1K ops     | 0.178            | 0.133            | 0.045      | **25.3%** |
| 10K ops    | 1.72             | 1.28             | 0.44       | **25.6%** |
| 100K ops   | 17.1             | 13.4             | 3.7        | **22.0%** |
2025-07-24 11:48:12 +03:00
Nedyalko Dyakov
225c0bf5b2 fix(tests): add global ctx in tests 2025-07-05 13:34:09 +03:00
Nedyalko Dyakov
7a0f316216 fix(tests): remove bench_decode tests 2025-07-05 13:09:14 +03:00
Nedyalko Dyakov
b23f43c2f1 fix(peek): non-blocking peek 2025-07-05 06:21:12 +03:00
Nedyalko Dyakov
604c8e313e fix(tests): debug logger 2025-07-05 05:04:09 +03:00
Nedyalko Dyakov
84123b1331 refactor(push): completly change the package structure 2025-07-05 02:52:40 +03:00