dreamfactorysoftware / dreamfactory

DreamFactory API Management Platform
https://www.dreamfactory.com
Apache License 2.0
1.53k stars 311 forks source link

role access page wait too long time #202

Open yitianlang opened 6 years ago

yitianlang commented 6 years ago
I have 1000+ tables in mongodb/mysql, and then I add role access to them. There are more than 1000+ rows in the table role_service_access. When I see the role access page, the page wait too long time, and nothing shows. 
Maybe the role access page should just query some rows in one time, but all rows.
jacotri77 commented 6 years ago

@yitianlang are you referring to this drop down when you go to add a component to the role, or are you timing out when trying to add the service to the role? https://cl.ly/ca7e2c20b082

yitianlang commented 6 years ago

The steps:

  1. I add the role: user.
  2. I insert 1000+ rows data into the table role_service_access.
  3. I just want to see the access page of the role user.
  4. The chrome wait too long time and get nothing.
jacotri77 commented 6 years ago

So if you go to the api docs tab and hit the role_service_access endpoint, as I am showing here: https://cl.ly/f661e028497e are you seeing the full 1000+ roles?

I am unclear why you chose to do this. When you create your database(s) and the tables are populated, you can create the roles which will map to your users when you add a role to the user.

Are you trying to programmatically add in 1000+ roles at a time?

What is the size of the machine are you running this on? Without a fair amount of RAM and a decent CPU, it That amount of data takes some time for the system to update as DreamFactory has to go through each and every role that you are creating and map the database tables and fields to it.

yitianlang commented 6 years ago

I have more than 1000+ tables to generate REST-API for app. So I add 1000+ HTTP/GET access reoceds into the table role_service_access of the database bitnami_dreamfactory.

When I want to see the role's access page (like your link: https://cl.ly/ca7e2c20b082). But the page is wait too long time.

jacotri77 commented 6 years ago

Great, thanks for the clarification. I will get back to you ASAP.

yitianlang commented 6 years ago

Thanks