mirror of
https://github.com/skywind3000/kcp.git
synced 2025-03-23 16:00:08 +08:00
Updated EN_KCP Best Practice (markdown)
parent
10c90743c7
commit
6451b466d8
@ -26,6 +26,6 @@ The recever can recover previous two packet from one packet. User should reduce
|
||||
|
||||
#### Advance Update
|
||||
|
||||
For server-side application, for example linux application server, `select` or `epool` is often used in `non-blocking` `asnc` architecture, to serve over `10k` clients. For these use scenarios, there are usually huge connections(>3k) to serve, it may cause performance issue when use `ikcp_update` for each connection to upddate, user should better use `ikcp_check` to replace `ikcp_update`. Unlike `ikcp_update` to update KCP every N ms, `ikcp_check` tells us the exactly time to update the KCP(Only need to update when called `ikcp_send` or `ikcp_input`).
|
||||
For server-side application, for example linux application server, `select` or `epoll` is often used in `non-blocking` `asnc` architecture, to serve over `10k` clients. For these use scenarios, there are usually huge connections(>3k) to serve, it may cause performance issue when use `ikcp_update` for each connection to upddate, user should better use `ikcp_check` to replace `ikcp_update`. Unlike `ikcp_update` to update KCP every N ms, `ikcp_check` tells us the exactly time to update the KCP(Only need to update when called `ikcp_send` or `ikcp_input`).
|
||||
|
||||
For example, user can use `ikcp_udpate` at the first time, then use `ikcp_check` to get the next time to call `ikcp_update`. It's reported that the CPU usage descreate form 60% to 15% when use `ikcp_check`.
|
||||
|
Loading…
Reference in New Issue
Block a user