Packets queuing in necko
Categories
(Core :: Networking: HTTP, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox88 | --- | fixed |
People
(Reporter: dragana, Assigned: dragana)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
Necko have a separate read and write path, i.e. if we need to read from a socket we poll for read, and the same for writes. If socket is ready to read/write, OnSocketReadable/Writable will be called. This 2 are separate code paths and I avoided to write to a socket when OnSocketReadable is called and vice versa.
if socket is ready for reading, we read some data. In the same call(OnSocketReadable) we need to check if we have something to write (only check, but we do not write while we are in OnSocketReadable). The check actually takes packets from neqo. We also need to check for a timeout, therefore we take all ready packets from neqo to get the timeout. In this way we queue packets in necko. This is probably not a problem but let's try to avoid it.
neqo does not know if it has something to send until it actually builds a packet. And the timer value is only return went there is nothing to send any more.
Options:
- We could try to poll for writing for each received packet. I am afraid that this is wasteful.
- in OnSocketReadable check if there is something o write. This will create a packet. Do not create all packets, create just one, start polling for write and set the timer to min(current_timer, 1s);
We could try to get timer value from neqo without creating all available packets, but I am not sure it is worth the trouble.
| Assignee | ||
Comment 1•5 years ago
|
||
Bug 1689554 will remove this queuing.
There is just a small refactoring left to make neqo glue code better.
| Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Comment 4•5 years ago
|
||
| bugherder | ||
Description
•