trio-websocket
                                
                                
                                
                                    trio-websocket copied to clipboard
                            
                            
                            
                        Don't explicitly pass a default (small) receive size, let trio choose.
The default size of 4 KiB is very small, and caused a lot of loops receiving buffers, that were clearly visible in benchmarks.
Also, it's not needed:  Optional; if omitted, then the stream object is free to pick a reasonable default.
So maybe let's not invent a redundant default here?
By passing None, it currently means we end up with 64 KiB instead, which sounds more appropriate: https://github.com/python-trio/trio/blob/master/src/trio/_highlevel_socket.py#L21-L25 And it can be hoped that later this will automagically become more intelligent if they implement the TODO.