You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Return to read immediately after a successful read.
Copying the filestream, now pipe, dgram, and socket streams return to read
again immediately after a successful read, so that we don't wait.
This is now obvious the problem in #685 and using the bandwidth-delay-product
we can see that a 250ms pause between reads of 4096B and 128KiB matches the
results seen.
Before:
```
jaq% time ./mtail -logs - -progs examples/rsyncd.mtail < internal/mtail/testdata/rsyncd.log
0.01s user 0.01s system 7% cpu 0.264 total
```
After:
```
jaq% time ./mtail -logs - -progs examples/rsyncd.mtail < internal/mtail/testdata/rsyncd.log
0.01s user 0.03s system 102% cpu 0.041 total
```
Thanks to @rideliner for the hint.
0 commit comments