-
Notifications
You must be signed in to change notification settings - Fork 429
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
Browsing features too slow when there are lots of features #3301
Comments
Unfortunately, at the moment those calls are necessary. Features are paged but the feature states (i.e. the enabled states/remote config for the environment) are accessed separately, so the frontend currently needs all feature states to be accessible in order to match them up. To get to 76 pages of 200 is a very extreme case but this probably needs to be sorted. I think the only way to solve this is to start returning the feature state in the /features call, we pass the environment as a get param to this endpoint, so I think it's possible @matthewelwell ? The only alternative is to do a get per result which seems excessive. |
@kyle-ssg , I think we can add this to the payload in the case that the environment query parameter is provided. |
@matthewelwell Great, could this get added / assigned to me when ready? |
I must say urgency of this task is not too high because there I wasn't able to reproduce this. I believe my local setup had a bug and imported the same flag many times. Certainly 76 * 200 = 15,000 feature flags is a lot to handle but must say not impossible 🙂 |
@kyle-ssg the response to the |
How are you running Flagsmith
Describe the bug
When there is a project with many feature flags (700+ in this case), the page for browsing flags becomes very slow and unresponsive. Searching a flag takes over 20 seconds.
I suspect most calls to
/api/v1/environments/<env-id>/featurestates/
are unnecessary.Steps To Reproduce
Expected behavior
Page should be responsive.
Screenshots
Screen.Recording.2024-01-16.at.14.04.49.mov
The text was updated successfully, but these errors were encountered: