openresty / openresty/lua-resty-websocket

lj_str_new

Open
#59 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.