Skip to content

perf(api): skip user-state queries for anonymous search views - #129433

Draft
joshuarli wants to merge 1 commit into
masterfrom
perf/groupsearchview-anonymous-queries
Draft

joshuarli wants to merge 1 commit into
masterfrom
perf/groupsearchview-anonymous-queries

Conversation

@joshuarli

Copy link
Copy Markdown
Member

Behavioral split from #129431 (performance-only).

GroupSearchViewSerializer.get_attrs accepts anonymous users but queried GroupSearchViewLastVisited and GroupSearchViewStarred with a null user id. Those rows cannot match, so skip both queries for anonymous users. The serialized response is unchanged.

This also removes the null-user-id assumption the typing pass had to narrow around.

The group search view serializer allows anonymous users but looked up
last-visited and starred rows with a null user id, which cannot match.
Skip both queries for anonymous users; the serialized output is
unchanged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant