-
Notifications
You must be signed in to change notification settings - Fork 143
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
get_related_resources()
calls user_can_read_graph()
multiple times for same graphs, huge slowdown
#11457
Comments
whatisgalen
changed the title
get_related_resources() calls
Sep 16, 2024
user_can_read_graph()
multiple times for same graphsget_related_resources()
calls user_can_read_graph()
multiple times for same graphs, huge slowdown
whatisgalen
added a commit
that referenced
this issue
Sep 16, 2024
11 tasks
whatisgalen
added a commit
that referenced
this issue
Sep 16, 2024
whatisgalen
added a commit
that referenced
this issue
Sep 16, 2024
whatisgalen
added a commit
that referenced
this issue
Sep 16, 2024
whatisgalen
added a commit
that referenced
this issue
Sep 16, 2024
whatisgalen
added a commit
that referenced
this issue
Sep 16, 2024
whatisgalen
added a commit
that referenced
this issue
Sep 17, 2024
whatisgalen
added a commit
that referenced
this issue
Sep 17, 2024
completed in #11458 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At this section of
get_related_resources
method (used by the resource_report API endpoint):the
user_can_read_graph
permissions method makes an ORM query every time it's called, even on relations shows graph we've already check. This can slow things down significantly, to the point where a single report takes up to 2 minutes to load. The slowdown is especially noticeable for resources with 50+ relationsThe text was updated successfully, but these errors were encountered: