Saturday, May 18, 2024
HomeGolangGws v1.4.5 replace: reminiscence and IO optimization - Releases

Gws v1.4.5 replace: reminiscence and IO optimization – Releases


This replace to gws has improved the IO methodology, with a peak IOPS improve of about 37% for 1000 connections, reaching 3 instances that of gorilla/websocket, and lowering reminiscence consumption to the identical degree as gorilla/websocket. The main points of the development are as follows:

  • Use io.Reader as an alternative of io.CopyN to learn knowledge, avoiding pointless allocs
  • Use internet.Buffers as an alternative of bufio.Author to jot down knowledge and cut back reminiscence copies
  • Take away bufio.Author from the connection, mark WriteBufferSize parameter as deprecated

Repo: github.com/lxzan/gws

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments