Closed Revertron closed 1 year ago
Hmmm, this change increases upload speed from 9-20MBps to about 160-200Mbps :))
The speedtest shows that it starts on about 20Mbps and goes down to 9Mbps till the end. And after the fix it goes to 200.
I will prepare a PR to yggdrasil-go
and here as well.
Currently, we create and free a lot of byte-array objects when working with TUN.
The memory diagram shows that there are a lot of GC runs when I run speed-test in browser.![image](https://user-images.githubusercontent.com/105154/198887082-2fc12bb6-88ea-48a9-871c-c7e8d7d07dcb.png)
I propose that we change API to use single byte array in each case. But we need to add start and length parameters for
read()
andwrite()
methods.