Skip to content
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

Auth._loadRoles will query the same role multiple times. #1365

Closed
blacha opened this issue Apr 5, 2016 · 0 comments
Closed

Auth._loadRoles will query the same role multiple times. #1365

blacha opened this issue Apr 5, 2016 · 0 comments

Comments

@blacha
Copy link
Contributor

blacha commented Apr 5, 2016

Given a role hierarchy of
role:a -> role:b -> role:c
role:a -> role:c

When loading all the roles using Auth._loadRoles for role:a, role:c will be queried for twice.

This seems to be a change in ParseServer, as the role look up Parse.com is much faster when a large number of roles are used.

In my app with a user with 100 roles, ParseServer it will generate over 1000 database queries for _Role lookups for every request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants