openresty / openresty/lua-resty-websocket
lj_str_new
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 523
- Forks
- 112
- Avg merge
- 1d 16m
- Merged PRs (30d)
- 2
Description
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 ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by profiling resty.websocket.protocol.recv_frame with perf top and stap, as described in the report, and compare the current implementation with the latest version's ffi_string use. Determine which string-allocation path accounts for the reported CPU usage; done means a measured improvement with performance-test results showing the issue is reduced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- networking, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100