-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poor Performance of the Roles and Permissions Page #2073
Comments
3 tasks
problem in representation: from this point we have big amount of queries to two tables ab_view_menu and ab_permission |
in log sqlalchemy looks good if u change model PermissionView to this:
|
@Paulo456 thanks, it works! |
2 tasks
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
I am engaged with the team in a small customization of Superset, where Flask Appbuilder is used as the basis. Roles and rights there are used stock from this library. When adding a large number of roles and permissions, the page starts to load unrealistically long. It can reach about 5-10 minutes.
When debugging through the SQLAlchemy logger, you can see a huge number of the same type of queries to the database.
I tried to understand the library code, but I could not quite understand where this problem is.
Environment
Flask-Appbuilder version: 4.3.3
pip freeze output:
Describe the expected results
In my opinion, the number of requests should be minimal and optimized. I think it can be optimized.
In console we can see something like this:
Describe the actual results
A lot of requests of the same type are sent to the database, which greatly slows down the page with a large number of new roles and permissions.
Steps to reproduce
flask fab create-app
logging.getLogger('sqlalchemy.engine').setLevel(logging.DEBUG)
to 17 line into init.py file to see all debug info from SQLAlchemy/roles/list
and see into the console logThe text was updated successfully, but these errors were encountered: