-
Notifications
You must be signed in to change notification settings - Fork 285
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
Permission updates in the UI are slow #904
Comments
Hey, I have a doubt, created a new root key and I feel it's depend on the backend. is'nt it ? |
can you elaborate? |
I tried to create a root key for test the speed, I feel UI updation slow because of backend response. correct me if I am wrong please. |
yes it's the backend that is slow, I linked the code above |
So that means, we have to optimize the backend as well ? |
the only bottleneck is in the backend, the ui just sends a trpc request |
Thanks for clearing. It takes some time understand the problem statement. Got it now, Can I work on that or someone from unkey is already working upon that? |
sure, go ahead |
hey @chronark, we can make use of Promise.all() for concurrently doing a network request Is this related as mentioned above or i am going in wrong direction ? |
Yeah, I deliberately didn't do a promise.all, cause apparently that's an issue with planetscale I haven't looked much deeper though and just accepted that it might be a bit slower for now. I'm reworking permissions a little bit right now, and adding roles, potentially we don't even need to upsert in parallel anymore |
Preliminary Checks
Reproduction / Replay Link (Optional)
No response
Issue Summary
We're looping through all required permissions and doing a network roundtrip for each.
unkey/apps/web/lib/trpc/routers/permission.ts
Line 123 in 6c516c3
Steps to Reproduce
Expected behavior
It should be much faster
Other information
No response
Screenshots
No response
Version info
The text was updated successfully, but these errors were encountered: