apisix
apisix copied to clipboard
perf: In function is_empty_yaml_line, 'string.find' plain mode is not recommended, and re.find is better.
Issue description
local function is_empty_yaml_line(line)
return line == '' or string.find(line, '^%s*$') or
string.find(line, '^%s*#')
end
Environment
- apisix version (cmd:
apisix version): - OS:
Minimal test code / Steps to reproduce the issue
1. 2. 3.
What's the actual result? (including assertion message & call stack if applicable)
What's the expected result?
Is there test data to prove it is better?
Currently bin/apisix is interpreted by the Lua.