RBAC performance

Does anyone know how is the performance of Yii authmanager ?

With the following example.

I have developed a management system that is going to be used by multiple organizations.

Going to implement the in-built Yii Authmanager (RBAC)

Assume the following

  • each organization has few hundreds of users.

  • each user has multiple roles.

  • each role maybe has about 500-1000 authorization items.

  • there are maybe thousands of authorization items (let’s say 5000 authorization items) in total.

Is Yii Authmanager able to handle the load?

Eg. If a user with 3 roles, each role has like 500 authorization items and few sub-roles, when accessing a certain page with access control, is the Yii AuthManager going to go through all thousands of authorization items checking access for that user at every page. Will it affect the page loading or system load since the access checking could be recursive.

I didnt look into how the Yii AuthManager is coded, so unsure if there is any performance issue when there are large number of roles and authorization items.

Your use case seems pretty trivial numbers are not that big it may seem to you. Imagine a site with millions of users and I have certainly worked on large scale apps that use yii we employ certain techniques like caching etc. but I think in your case it should not impact performance yii is plenty fast out of the box.

Actually, i am trying to simplify the use case. I am pretty sure it will go up to over hundreds of role with hundreds of thousands of authorization items.

thanks for the assurance that the in-built Yii AuthManager is able to scale up alot more than my simplified use case.