Hello,
When I use the authz-casbin plugin in Apache APISIX with a large policy, I found that the method of newEnforcerFromText takes a long time (about 40s).
After digging into it, the code below confused me:
https://github.com/casbin/lua-casbin/blob/249ae23a23d1be74762c7f3e25e5685e61b6e2d6/src/persist/Adapter.lua#L42-L56
- Do we need to traverse
model.model[sec][key].policy again of line~53.
- Is there any way to improve this function?
Hello,
When I use the
authz-casbinplugin in Apache APISIX with a large policy, I found that the method ofnewEnforcerFromTexttakes a long time (about 40s).After digging into it, the code below confused me:
https://github.com/casbin/lua-casbin/blob/249ae23a23d1be74762c7f3e25e5685e61b6e2d6/src/persist/Adapter.lua#L42-L56
model.model[sec][key].policyagain of line~53.