Bug description

When attempting to add or edit a role, clicking the "Permissions" dropdown causes the browser page to freeze completely and eventually show a "Page Unresponsive" dialog. This occurs in an environment with a very large number of permissions (due to many connected schemas and tables). The page for listing roles is fast (after applying a separate fix), but adding/editing is unusable.

Expected results The permissions dropdown should open in a reasonable amount of time, allowing the user to search for and select permissions without freezing the browser.

Actual results The browser's main thread locks up, the UI becomes completely unresponsive, and a "Page Unresponsive" error is displayed.

Image

How to reproduce the bug Go to an instance of Superset with a large number of permissions (e.g., thousands of table permissions).

Navigate to "Settings" -> "List Roles".

Click the + ROLE button to add a new role.

Click on the "Select Value" input field for "Permissions".

Observe that the browser tab freezes.

Environment Browser version: (e.g., Chrome Version 128.0.6613.84)

Superset version: 3.0.0

Deployment: Custom Docker image deployed on AWS EKS. Backend database is Aurora PostgreSQL.

My hypothesis is that the frontend select component is attempting to render all tens of thousands of permission options into the DOM at once, which is causing the browser's main thread to lock up. A "virtualized" or "windowed" select component would likely solve this issue.

Any guidance on a potential workaround or confirmation if this is fixed in a newer version of Superset or Flask-AppBuilder would be greatly appreciated. Thanks!

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

Hi @subinjp! I'm Dosu and I’m helping the superset team.

Your hypothesis is correct: the permissions dropdown in the role management UI is not virtualized or optimized for large numbers of permissions, which causes the browser to freeze when rendering thousands of options. There are currently no fixes or optimizations for this in the latest Superset codebase or Flask-AppBuilder, and no configuration options or workarounds are documented for this scenario. A virtualized or windowed select component would be needed to handle large permission lists efficiently, but this is not implemented yet in Superset's frontend.
Reference

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X