Closed kohtala closed 2 years ago
I also updated the tests for new node versions. Seems 17.x has some problems.
This also carries fix to split outgoing messages to respect max_frame_size
and an untested change to send as many frames as fits in the window for a message larger than the window.
The node 17x. test needs new keys and certificates for upgraded OpenSSL in node 17. I'm short on time to find again how those were made.
The large frame reception is now fast enough to be usable. I added a method to transport to peek if the size can be known from the first bytes.
I did take a look at delaying fragmenting the message on send, but did not see a simple solution. I think there may be something funny with the Outgoing.window and that would need to be studied at the same time. If I understood right, it should know beforehand the number of transfer frames needed for the pending deliveries. Currently it seems to just count down from types.MAX_UINT.
Node 18 had become current. I changed the versions to test.
Thanks again @kohtala !
Large message reception performance is bad due to repeated calls to
Buffer.concat
to grow the buffer (#381).This addresses that at the transfer frame reception so that smaller
max_frame_size
helps avoid large Buffer allocations. There are still repeated smaller Buffer allocations reading the frame.