-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying the read request size of NamedPipe #1582
Comments
@mlsvrts am I correct in saying that the problem here is not necessarily the buffer size, but that the read is not completed the moment data is available? Perhaps their are flags we can use to return the moment any data is available. |
@Thomasdezeeuw Yes, I agree that's a correct interpretation. Actually the performance would probably be better that way as well; in the case of USB to Serial adapters, for instance, I think you could receive entire blocks of data at the same time. |
I am running up against this issue as well. I am trying to reasonably timestamp messages coming over a serial port, but with the current situation a whole buffer of messages comes in about once every half a second due to the buffering happening in |
@vadixidav, @mlsvrts would a mio/src/sys/windows/named_pipe.rs Line 806 in c9e3369
|
@Thomasdezeeuw Yes, I think that's the most straightforward solution; I think dynamic modification also allows a common pattern where an application might read a header of some fixed length, and then read a body of length indicated by the header. |
Can anyone give #1608 a try? |
Closing this due to inactivity. It seems people want this, but no one is willing to put in the work. Also see related pr #1778, which might help with larger buffers. |
I still use my workaround fork for this. I might actually need this very soon, so I will reopen one if I make the proper changes. |
I've been running into some performance issues reading intermittent byte streams from serial ports on windows. I have detailed the exact issue here:
berkowski/tokio-serial#55
I can fix the performance issue (for my use-case) by modiyfing named_pipe.rs, to force read requests of only 1-byte. This seems to work well, and emulates the behavior of PuTTy.
Is it possible to modify the read request size in some way that doesn't require modifying the library source? This would allow
mio-serial
andtokio-serial
to nicely expose the same feature, which could lead to some serious performance improvements -- particularly if the end application is decoding packets of some fixed length.The text was updated successfully, but these errors were encountered: