zjx20

Results 7 issues of zjx20

Sometimes we would like to implement a custom `net.PacketConn`, for example the `tcpraw`. This patch allows kcp-go to leverage the batching ability provided by the custom conn, if possible.

profile内存时发现,gaio内部用 list.List 来存放读者/写者的回调上下文,因此每次异步读写(写操作大部分情况就直接tryWrite成功了,所以更多情况是读操作)都会动态创建 list.Element 对象。 其实一般的应用,一个连接只会有1个读请求,或者若干个写请求,readers/writers 的数量相对较少,用slice就可以满足需求。这个PR用slice实现了 cbList 用来代替 list.List,以此优化内存分配次数较多的问题。 ![image](https://user-images.githubusercontent.com/2639200/133780801-2b02f742-0795-47cb-8bd2-03f822b695b0.png)

每次调用`WaitIO()`都会新创建一个`[]OpResult`小对象,对性能造成一定影响;这个PR修改了`WaitIO()`的接口,允许用户传入一个预先分配好的slice,从而避免每次重新创建。 ```go buf := make([]gaio.OpResult, 0, 100) for { results, err := w.WaitIO(buf) ... } ``` 甚至用户可以直接重用返回的slice ```go buf := make([]gaio.OpResult, 0, 100) for { results, err := w.WaitIO(buf) for...

I would like to run `mvn -Dmaven.test.skip=true clean package`, but `maven-dependency-plugin` complains `Unused declared dependencies` for some libraries used by the test code, which breaks the compilation. Please check the...

# Describe what this PR does # This PR makes scripts/minikube.sh work on macOS M1 with the qemu2 driver. Some modifications have been made to handle the compatibility of bash...

component/testing
keepalive