You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
called GetImplicitPermissionsForUser takes about 15-20 seconds, and got pprof cpu profile as belows. 80% of time cost is calling function roleManager.hasLinkHelperlen(model["p"]["p"].Policy) times:
desired solution
GetImplicitPermissionsForUser can fetch policy-role, whose role is relate to policy_id, by GetImplicitRolesForUser firstly, then collect policies which matches policy-role in for-loop.
It's would optimize 99% latency of function GetImplicitPermissionsForUser.
The text was updated successfully, but these errors were encountered:
model description
pType 'p'
In my rbac policy, ptype 'p' may have same v0 (policyid) among different rules,such as:
pType 'g'
and g ptype has simple model that is:
matchers
matchers definition is:
performance analyze
called
GetImplicitPermissionsForUser
takes about 15-20 seconds, and got pprof cpu profile as belows. 80% of time cost is calling functionroleManager.hasLinkHelper
len(model["p"]["p"].Policy)
times:desired solution
GetImplicitPermissionsForUser
can fetch policy-role, whose role is relate to policy_id, byGetImplicitRolesForUser
firstly, then collect policies which matches policy-role in for-loop.It's would optimize 99% latency of function
GetImplicitPermissionsForUser
.The text was updated successfully, but these errors were encountered: