openresty / lua-resty-websocket

WebSocket support for the ngx_lua module (and OpenResty)
508 stars 106 forks source link

lj_str_new #59

Open wood001 opened 3 years ago

wood001 commented 3 years ago

hello

I use lua-resty-websocket as server. when we do performance test, we found lj_str_new use too much cpu by 'perf top'. so we use stap to collect the cpu useage, and found 'lj_str_new ' use too much cpu in 'resty.websocket.protocol.recv_frame' function.

I check the latest version, it use ffi_string. we try the latest version, the cpu issuse is still exist. Can we do any improvement ?